<!DOCTYPE html>


<html class="html__responsive " itemscope itemtype="https://schema.org/QAPage" lang="en">

<head>

    <title>function - JavaScript curry: what are the practical applications? - Stack Overflow</title>
    <link href="https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196" rel="shortcut icon">
    <link href="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a"
          rel="apple-touch-icon">
    <link href="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a" rel="image_src">
    <link href="/opensearch.xml" rel="search" title="Stack Overflow" type="application/opensearchdescription+xml">
    <link href="https://stackoverflow.com/questions/113780/javascript-curry-what-are-the-practical-applications"
          rel="canonical"/>
    <meta content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0" name="viewport">
    <meta content="website" property="og:type"/>
    <meta content="https://stackoverflow.com/questions/113780/javascript-curry-what-are-the-practical-applications"
          property="og:url"/>
    <meta content="Stack Overflow" property="og:site_name"/>
    <meta content="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon@2.png?v=73d79a89bded" itemprop="image primaryImageOfPage"
          property="og:image"/>
    <meta content="summary" name="twitter:card"/>
    <meta content="stackoverflow.com" name="twitter:domain"/>
    <meta content="JavaScript curry: what are the practical applications?" itemprop="name" name="twitter:title"
          property="og:title"/>
    <meta content="Agreeing with Hank Gay - It&#x27;s extremely useful in certain true functional programming languages - because it&#x27;s a necessary part.  For example, in Haskell you simply cannot take multiple parameters ..." itemprop="description" name="twitter:description"
          property="og:description"/>
    <script id="webpack-public-path" type="text/uri-list">https://cdn.sstatic.net/</script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js"></script>
    <script defer
            src="https://cdn.sstatic.net/Js/third-party/npm/@stackoverflow/stacks/dist/js/stacks.min.js?v=d5f780ae3281"></script>
    <script src="https://cdn.sstatic.net/Js/stub.en.js?v=30dc0e2fbcff"></script>

    <link href="https://cdn.sstatic.net/Shared/stacks.css?v=dbee492db9b7" rel="stylesheet" type="text/css">
    <link href="https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=d540aba22a4d" rel="stylesheet"
          type="text/css">


    <link href="/feeds/question/113780" rel="alternate"
          title="Feed for question &#x27;JavaScript curry: what are the practical applications?&#x27;"
          type="application/atom+xml">
    <script>
        StackExchange.ready(function () {

                    StackExchange.using("snippets", function () {
                        StackExchange.snippets.initSnippetRenderer();
                    });

                StackExchange.using("postValidation", function () {
                    StackExchange.postValidation.initOnBlurAndSubmit($('#post-form'), 2, 'answer');
                });


                StackExchange.question.init({canOpenBounty:true,votesCast:[{"PostId":114030,"VoteTypeId":2}],showTrendingSortLaunchPopover:false,showTrendingSortPostLaunchPopover:false,totalCommentCount:5,shownCommentCount:5,enableTables:true,questionId:113780});

                styleCode();

                    StackExchange.realtime.subscribeToQuestion('1', '113780');
                    StackExchange.using("gps", function () { StackExchange.gps.trackOutboundClicks('#content', '.js-post-body'); });


            });
    </script>


    <script async src="https://accounts.google.com/gsi/client"></script>
    <link href="https://cdn.sstatic.net/Shared/Channels/channels.css?v=db82e15fc6d3" rel="stylesheet" type="text/css">


    <script>
        StackExchange.ready(function () {
            StackExchange.realtime.init('wss://qa.sockets.stackexchange.com');
                StackExchange.realtime.subscribeToReputationNotifications('1');
        StackExchange.realtime.subscribeToTopBarNotifications('1');
        });
    </script>
    <script data-module-name="Shared/options.mod" data-role="module-args" type="application/json">{
        "options": {
            "locale": "en",
            "serverTime": 1710719472,
            "routeName": "Questions/Show",
            "stackAuthUrl": "https://stackauth.com",
            "networkMetaHostname": "meta.stackexchange.com",
            "site": {
                "name": "Stack Overflow",
                "description": "Q\u0026A for professional and enthusiast programmers",
                "isNoticesTabEnabled": true,
                "enableNewTagCreationWarning": true,
                "insertSpaceAfterNameTabCompletion": false,
                "id": 1,
                "cookieDomain": ".stackoverflow.com",
                "childUrl": "https://meta.stackoverflow.com",
                "negativeVoteScoreFloor": null,
                "enableSocialMediaInSharePopup": true,
                "protocol": "https"
            },
            "user": {
                "fkey": "e4eb9ddaf12ea2d2a9fa3af2b81a4e28284a8553f2ae1b7f0f153630635d6de6",
                "tid": "a0d73b88-74bc-f37c-7618-1c6817ba8668",
                "rep": 500,
                "isRegistered": true,
                "userType": 3,
                "userId": 713809,
                "accountId": 367545,
                "gravatar": "\u003cdiv class=\u0022gravatar-wrapper-32\u0022\u003e\u003cimg src=\u0022https://i.stack.imgur.com/lqC64.jpg?s=32\u0026amp;g=1\u0022 alt=\u0022Byron Katz\u0026#39;s user avatar\u0022 width=\u002232\u0022 height=\u002232\u0022 class=\u0022bar-sm\u0022\u003e\u003c/div\u003e",
                "profileUrl": "https://stackoverflow.com/users/713809/byron-katz",
                "canSeeDeletedPosts": false,
                "ab": {
                    "tour_signup_cta": {
                        "v": "google_one_tap",
                        "g": 2
                    },
                    "new_header_design_low_rep": {
                        "v": "modal_signup",
                        "g": 3
                    }
                }
            },
            "realtime": {
                "newest": false,
                "active": false,
                "tagged": true,
                "staleDisconnectIntervalInHours": 0
            },
            "events": {
                "postType": {
                    "question": 1
                },
                "postEditionSection": {
                    "title": 1,
                    "body": 2,
                    "tags": 3
                }
            }
        }
    }</script>
    <script data-module-name="Shared/settings.mod" data-role="module-args" type="application/json">{
        "settings": {
            "questions": {
                "questionTitleLengthStartLiveWarningChars": 50,
                "enableSavesFeature": true,
                "maxTitleSize": 150,
                "enableQuestionTitleLengthLiveWarning": true
            },
            "accounts": {
                "currentPasswordRequiredForChangingStackIdPassword": true
            },
            "search": {},
            "userMessaging": {
                "showNewFeatureNotice": true
            },
            "flags": {
                "allowRetractingCommentFlags": true,
                "allowRetractingFlags": true
            },
            "mentions": {
                "maxNumUsersInDropdown": 50
            },
            "subscriptions": {
                "defaultFreemiumMaxTrueUpSeats": 50,
                "defaultMaxTrueUpSeats": 1000,
                "defaultBasicMaxTrueUpSeats": 250
            },
            "snippets": {
                "snippetsEnabled": true,
                "renderDomain": "stacksnippets.net"
            },
            "legal": {
                "oneTrustTCFConfigId": "c3d9f1e3-55f3-4eba-b268-46cee4c6789c",
                "useCustomConsent": false
            },
            "markdown": {
                "enableTables": true
            },
            "elections": {
                "opaVoteResultsBaseUrl": "https://www.opavote.com/results/"
            },
            "site": {
                "styleCode": true,
                "allowImageUploads": true,
                "stacksEditorPreviewEnabled": true,
                "forceHttpsImages": true,
                "enableImgurHttps": true,
                "enableUserHovercards": true
            },
            "paths": {
                "jQueryUICSSPath": "https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.0/themes/smoothness/jquery-ui.css",
                "jQueryUIJSPath": "https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min.js"
            },
            "auth": {},
            "comments": {},
            "intercom": {
                "appId": "inf0secd"
            },
            "tags": {}
        }
    }</script>
    <script>StackExchange.init();</script>

    <script>
        StackExchange.using.setCacheBreakers({"Js/adops.en.js":"6da43f5e0a84","Js/ask.en.js":"","Js/begin-edit-event.en.js":"20edbaccceae","Js/copy-transpiled.en.js":"e0eb0f70fc72","Js/events.en.js":"","Js/explore-qlist.en.js":"2b1f34938b8b","Js/full-anon.en.js":"9cd1bae63ffc","Js/full.en.js":"84a2440b4e83","Js/highlightjs-loader.en.js":"510e2f94c2bf","Js/inline-tag-editing.en.js":"3e8cc64ee9d6","Js/keyboard-shortcuts.en.js":"107c2ac31497","Js/markdown-it-loader.en.js":"5818ef89ff9d","Js/mentions-transpiled.en.js":"d398f7c1afbf","Js/moderator.en.js":"b47aa4009d9d","Js/postCollections-transpiled.en.js":"11a255fe9394","Js/post-validation.en.js":"243bf7d290a3","Js/question-editor.en.js":"","Js/review-v2-transpiled.en.js":"d8246fd945d5","Js/revisions.en.js":"47b4d5ac24c9","Js/stacks-editor.en.js":"38fc04774f41","Js/tageditor.en.js":"dc13482a67f8","Js/tageditornew.en.js":"b3d2f0187c1a","Js/tagsuggestions.en.js":"bd6ec908f2a7","Js/unlimited-transpiled.en.js":"f26a1d5f3365","Js/wmd.en.js":"fe1f36bd295a","Js/snippet-javascript-codemirror.en.js":"ae1dcf38deb7"});
        StackExchange.using("gps", function() {
             StackExchange.gps.init(true);
        });
    </script>
    <noscript id="noscript-css">
        <style>body,.s-topbar{margin-top:1.9em}</style>
    </noscript>
</head>
<body class="question-page unified-theme">

<div id="notify-container"></div>
<div id="custom-header"></div>


<header class="s-topbar ps-fixed t0 l0 js-top-bar">
    <div class="s-topbar--container">
        <a aria-controls="left-sidebar" aria-expanded="false" aria-haspopup="true" class="s-topbar--menu-btn js-left-sidebar-toggle"
           href="#" role="menuitem"><span></span></a>
        <div class="topbar-dialog leftnav-dialog js-leftnav-dialog dno">
            <div class="left-sidebar js-unpinned-left-sidebar" data-can-be="left-sidebar" data-is-here-when="sm"></div>
        </div>
        <a class="s-topbar--logo js-gps-track" data-gps-track="top_nav.click({is_current:false, location:2, destination:8})"
           href="https://stackoverflow.com">
            <span class="-img _glyph">Stack Overflow</span>
        </a>


        <ol class="s-navigation" role="presentation">


            <li>
                <a aria-controls="products-popover"
                   class="s-navigation--item js-gps-track js-products-menu"
                   data-action="s-popover#toggle"
                   data-controller="s-popover"
                   data-ga="[&quot;top navigation&quot;,&quot;products menu click&quot;,null,null,null]"
                   data-gps-track="top_nav.products.click({location:2, destination:1})"
                   data-s-popover-placement="bottom"
                   data-s-popover-toggle-class="is-selected"
                   href="#">
                    Products
                </a>
            </li>

        </ol>
        <div aria-hidden="true"
             class="s-popover ws2 mtn2 p0"
             id="products-popover"
             role="menu">
            <div class="s-popover--arrow"></div>
            <ol class="list-reset s-anchors s-anchors__inherit">
                <li class="m6">
                    <a class="bar-sm p6 d-block h:bg-black-225 js-gps-track" data-ga="[&quot;top navigation&quot;,&quot;public qa submenu click&quot;,null,null,null]"
                       data-gps-track="top_nav.products.click({location:2, destination:2})"
                       href="/">
                        <span class="fs-body1 d-block">Stack Overflow</span>
                        <span class="fs-caption d-block fc-black-400">Public questions &amp; answers</span>
                    </a>
                </li>
                <li class="m6">
                    <a class="bar-sm p6 d-block h:bg-black-225 js-gps-track" data-ga="[&quot;top navigation&quot;,&quot;teams submenu click&quot;,null,null,null]"
                       data-gps-track="top_nav.products.click({location:2, destination:3})"
                       href="https://stackoverflow.co/teams/">
                        <span class="fs-body1 d-block">Stack Overflow for Teams</span>
                        <span class="fs-caption d-block fc-black-400">Where developers &amp; technologists share private knowledge with coworkers</span>
                    </a>
                </li>
                <li class="m6">
                    <a class="bar-sm p6 d-block h:bg-black-225 js-gps-track" data-ga="[&quot;top navigation&quot;,&quot;talent submenu click&quot;,null,null,null]"
                       data-gps-track="top_nav.products.click({location:2, destination:5})"
                       href="https://stackoverflow.co/talent/">
                        <span class="fs-body1 d-block">Talent</span>
                        <span class="fs-caption d-block fc-black-400">
								Build your employer brand
							</span>
                    </a>
                </li>
                <li class="m6">
                    <a class="bar-sm p6 d-block h:bg-black-225 js-gps-track"
                       data-ga="[&quot;top navigation&quot;,&quot;advertising submenu click&quot;,null,null,null]"
                       data-gps-track="top_nav.products.click({location:2, destination:6})"
                       href="https://stackoverflow.co/advertising/">
                        <span class="fs-body1 d-block">Advertising</span>
                        <span class="fs-caption d-block fc-black-400">Reach developers &amp; technologists worldwide</span>
                    </a>
                </li>
                <li class="bt bc-black-200 py6 px6 bbr-md">
                    <a class="bar-sm p6 d-block h:bg-black-225 js-gps-track" data-ga="[&quot;top navigation&quot;,&quot;labs submenu click&quot;,null,null,null]"
                       data-gps-track="top_nav.products.click({location:2, destination:7})"
                       href="https://stackoverflow.co/labs/">
                        <span class="fs-body1 d-block">Labs</span>
                        <span class="fs-caption d-block fc-black-400">The future of collective knowledge sharing</span>
                    </a>
                </li>
                <li class="bg-black-100 bt bc-black-200 py6 px6 bbr-md">
                    <a class="fc-black-400 d-block py6 px6 h:fc-black-600 js-gps-track" data-ga="[&quot;top navigation&quot;,&quot;about submenu click&quot;,null,null,null]"
                       data-gps-track="top_nav.products.click({location:2, destination:7})"
                       href="https://stackoverflow.co/">About the
                        company</a>
                </li>
            </ol>
        </div>


        <form action=/search autocomplete="off" class="s-topbar--searchbar js-searchbar " id="search" role="search">
            <div class="s-topbar--searchbar--input-group">
                <input aria-controls="top-search"
                       aria-label="Search"
                       autocomplete="off"
                       class="s-input s-input__search js-search-field "
                       data-action="focus->s-popover#show"
                       data-controller="s-popover"
                       data-s-popover-placement="bottom-start"
                       maxlength="240"
                       name="q"
                       placeholder="Search&#x2026;"
                       role="combobox"
                       type="text"
                       value=""/>
                <svg aria-hidden="true" class="s-input-icon s-input-icon__search svg-icon iconSearch" height="18"
                     viewBox="0 0 18 18" width="18">
                    <path d="m18 16.5-5.14-5.18h-.35a7 7 0 1 0-1.19 1.19v.35L16.5 18l1.5-1.5ZM12 7A5 5 0 1 1 2 7a5 5 0 0 1 10 0Z"/>
                </svg>
                <div class="s-popover p0 wmx100 wmn4 sm:wmn-initial js-top-search-popover" id="top-search" role="menu">
                    <div class="s-popover--arrow"></div>
                    <div class="js-spinner p24 d-flex ai-center jc-center d-none">
                        <div class="s-spinner s-spinner__sm fc-orange-400">
                            <div class="v-visible-sr">Loading&#x2026;</div>
                        </div>
                    </div>

                    <span class="v-visible-sr js-screen-reader-info"></span>
                    <div class="js-ac-results overflow-y-auto hmx3 d-none"></div>

                    <div aria-describedby="Tips for searching" class="js-search-hints"></div>
                </div>
            </div>
        </form>


        <nav class="h100 ml-auto overflow-x-auto pr12">
            <ol class="s-topbar--content" role="menubar">
                <li role="none">
                    <button aria-controls="search"
                            aria-haspopup="true" aria-label="Search" class="s-topbar--item s-btn s-btn__icon s-btn__muted d-none sm:d-inline-flex js-searchbar-trigger" role="menuitem"
                            title="Click to show search">
                        <svg aria-hidden="true" class="svg-icon iconSearch" height="18" viewBox="0 0 18 18" width="18">
                            <path d="m18 16.5-5.14-5.18h-.35a7 7 0 1 0-1.19 1.19v.35L16.5 18l1.5-1.5ZM12 7A5 5 0 1 1 2 7a5 5 0 0 1 10 0Z"/>
                        </svg>
                    </button>
                </li>

                <li role="none">
                    <a class="s-topbar--item s-user-card s-user-card__small m0 px12 js-gps-track"
                       data-gps-track="profile_summary.click()" href="/users/713809/byron-katz"
                       role="menuitem">
                        <div class="s-avatar s-avatar__24 s-user-card--avatar sm:m0" title="Byron Katz"><img
                                alt="Byron Katz&#39;s user avatar"
                                class="bar-sm s-avatar--image js-avatar-me" height="24" src="https://i.stack.imgur.com/lqC64.jpg?s=64&amp;g=1"
                                width="24"></div>
                        <span class="v-visible-sr">Byron Katz</span>

                        <div class="s-user-card--info sm:d-none">
                            <ul class="s-user-card--awards">
                                <li aria-hidden="true" class="s-user-card--rep js-header-rep"
                                    title="your reputation: 500">
                                    500
                                    <span class="v-visible-sr">, 500 reputation</span>
                                </li>
                                <li class="-badges mr0">
                                    <span aria-hidden="true" title="5 silver badges"><span class="badge2">&#9679;</span><span
                                            class="badgecount">5</span></span><span
                                        class="v-visible-sr">5 silver badges</span><span aria-hidden="true"
                                                                                         title="10 bronze badges"><span
                                        class="badge3">&#9679;</span><span class="badgecount">10</span></span><span
                                        class="v-visible-sr">10 bronze badges</span></li>
                            </ul>
                        </div>
                    </a>
                </li>
                <li role="none">
                    <a aria-expanded="false" aria-haspopup="true"
                       aria-label="Inbox (1 unread message)"
                       class="s-topbar--item js-inbox-button" data-unread-count="1" href="https://stackexchange.com/users/367545?tab=inbox" role="menuitem"
                       title="You have unread inbox messages">
                        <svg aria-hidden="true" class="svg-icon iconInbox" height="18" viewBox="0 0 20 18" width="20">
                            <path d="M4.63 1h10.56a2 2 0 0 1 1.94 1.35L20 10.79V15a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-4.21l2.78-8.44c.25-.8 1-1.36 1.85-1.35Zm8.28 12 2-2h2.95l-2.44-7.32a1 1 0 0 0-.95-.68H5.35a1 1 0 0 0-.95.68L1.96 11h2.95l2 2h6Z"/>
                        </svg>
                        <span class="s-activity-indicator s-activity-indicator__danger js-unread-count">1</span>
                    </a>
                </li>
                <li role="none">
                    <a aria-expanded="false"
                       aria-haspopup="true" aria-label="Achievements"
                       class="s-topbar--item js-achievements-button" data-lit-up="false"
                       data-unread-class="fc-success" data-unread-count="0"
                       href="https://stackexchange.com/users/367545?tab=reputation" role="menuitem" title="Recent achievements: reputation, badges, and privileges earned">
                        <svg aria-hidden="true" class="svg-icon iconAchievements" height="18" viewBox="0 0 18 18"
                             width="18">
                            <path d="M15 2V1H3v1H0v4c0 1.6 1.4 3 3 3v1c.4 1.5 3 2.6 5 3v2H5s-1 1.5-1 2h10c0-.4-1-2-1-2h-3v-2c2-.4 4.6-1.5 5-3V9c1.6-.2 3-1.4 3-3V2h-3ZM3 7c-.5 0-1-.5-1-1V4h1v3Zm8.4 2.5L9 8 6.6 9.4l1-2.7L5 5h3l1-2.7L10 5h2.8l-2.3 1.8 1 2.7h-.1ZM16 6c0 .5-.5 1-1 1V4h1v2Z"/>
                        </svg>
                        <span class="s-activity-indicator s-activity-indicator__success js-unread-count d-none">+0</span>
                    </a>
                </li>
                <li role="none">
                    <a aria-expanded="false" aria-haspopup="true" aria-label="Review (needs attention)"
                       class="s-topbar--item js-gps-track js-review-button"
                       data-gps-track="review_popup.click({ in_danger: true })"
                       href="/review"
                       id="review-button" role="menuitem"
                       title="Review queues - help improve the site">
                        <svg aria-hidden="true" class="svg-icon iconReviewQueue" height="18" viewBox="0 0 18 18"
                             width="18">
                            <path d="m11 12.47 5-4.97V3a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6.5l-2.79-2.8a1 1 0 0 1 0-1.4l2.1-2.1a1 1 0 0 1 1.4 0L11 12.47ZM2 7h10v2H2V7Zm0-4h12v2H2V3Zm0 10v-2h3v2H2Zm9 4.5 7-7L16.5 9 11 14.5 8.5 12 7 13.5l4 4Z"/>
                        </svg>

                        <div class="s-activity-indicator s-activity-indicator__danger">
                            <div class="v-visible-sr">Review (needs attention)</div>
                        </div>
                    </a>
                </li>
                <li role="none">
                    <a aria-controls="topbar-help-dialog" aria-haspopup="true" class="s-topbar--item js-help-button"
                       data-ga="[&quot;top navigation&quot;,&quot;help menu click&quot;,null,null,null]" href="/help" role="menuitem"
                       title="Help Center and other resources">
                        <svg aria-hidden="true" class="svg-icon iconHelp" height="18" viewBox="0 0 18 18" width="18">
                            <path d="M9 1C4.64 1 1 4.64 1 9c0 4.36 3.64 8 8 8 4.36 0 8-3.64 8-8 0-4.36-3.64-8-8-8Zm.81 12.13c-.02.71-.55 1.15-1.24 1.13-.66-.02-1.17-.49-1.15-1.2.02-.72.56-1.18 1.22-1.16.7.03 1.2.51 1.17 1.23ZM11.77 8c-.59.66-1.78 1.09-2.05 1.97a4 4 0 0 0-.09.75c0 .05-.03.16-.18.16H7.88c-.16 0-.18-.1-.18-.15.06-1.35.66-2.2 1.83-2.88.39-.29.7-.75.7-1.24.01-1.24-1.64-1.82-2.35-.72-.21.33-.18.73-.18 1.1H5.75c0-1.97 1.03-3.26 3.03-3.26 1.75 0 3.47.87 3.47 2.83 0 .57-.2 1.05-.48 1.44Z"/>
                        </svg>
                    </a>
                </li>
                <div class="topbar-dialog help-dialog js-help-dialog dno" id="topbar-help-dialog" role="menu">
                    <div class="modal-content">
                        <ul>
                            <li>
                                <a class="js-gps-track s-block-link" data-ga="[&quot;top navigation&quot;,&quot;tour submenu click&quot;,null,null,null]"
                                   data-gps-track="help_popup.click({ item_type:1 })"
                                   href="/tour">
                                    Tour
                                    <span class="item-summary">
                                    Start here for a quick overview of the site
                                </span>
                                </a>
                            </li>
                            <li>
                                <a class="js-gps-track s-block-link" data-ga="[&quot;top navigation&quot;,&quot;help center&quot;,null,null,null]"
                                   data-gps-track="help_popup.click({ item_type:4 })"
                                   href="/help">
                                    Help Center
                                    <span class="item-summary">
                                Detailed answers to any questions you might have
                            </span>
                                </a>
                            </li>
                            <li>
                                <a class="js-gps-track s-block-link" data-ga="[&quot;top navigation&quot;,&quot;meta submenu click&quot;,null,null,null]"
                                   data-gps-track="help_popup.click({ item_type:2 })"
                                   href="https://meta.stackoverflow.com">
                                    Meta
                                    <span class="item-summary">
                                            Discuss the workings and policies of this site
                                        </span>
                                </a>
                            </li>
                            <li>
                                <a class="js-gps-track s-block-link" data-ga="[&quot;top navigation&quot;,&quot;about us submenu click&quot;,null,null,null]"
                                   data-gps-track="help_popup.click({ item_type:6 })"
                                   href="https://stackoverflow.co/">
                                    About Us
                                    <span class="item-summary">
                                        Learn more about Stack Overflow the company, and our products
                                    </span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
                <li role="none">
                    <a aria-expanded="false" aria-haspopup="true"
                       aria-label="Site switcher"
                       class="s-topbar--item js-site-switcher-button js-gps-track"
                       data-ga="[&quot;top navigation&quot;,&quot;stack exchange click&quot;,null,null,null]"
                       data-gps-track="site_switcher.show"
                       href="https://stackexchange.com" role="menuitem"
                       title="A list of all 183 Stack Exchange sites">
                        <svg aria-hidden="true" class="svg-icon iconStackExchange" height="18" viewBox="0 0 18 18"
                             width="18">
                            <path d="M15 1H3a2 2 0 0 0-2 2v2h16V3a2 2 0 0 0-2-2ZM1 13c0 1.1.9 2 2 2h8v3l3-3h1a2 2 0 0 0 2-2v-2H1v2Zm16-7H1v4h16V6Z"/>
                        </svg>
                    </a>
                </li>


                <li class="js-topbar-dialog-corral" role="presentation">


                    <div class="topbar-dialog siteSwitcher-dialog dno" role="menu">
                        <div class="header fw-wrap">
                            <h3 class="flex--item">
                                <a href="https://stackoverflow.com">current community</a>
                            </h3>
                            <div class="flex--item fl1">
                                <div class="ai-center d-flex jc-end">
                                    <button
                                            aria-label="Close"
                                            class="js-close-button s-btn s-btn__muted p0 ml8 d-none sm:d-block"
                                            type="button"
                                    >
                                        <svg aria-hidden="true" class="svg-icon iconClear" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M15 4.41 13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41Z"/>
                                        </svg>
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="modal-content bg-blue-200 current-site-container">
                            <div class="d-none sm:d-block">
                                <div class="d-flex ai-end">
                                    <div class="s-user-card flex--item fl1">
                                        <a class="s-avatar s-avatar__32 s-user-card--avatar"
                                           href="/users/713809/byron-katz">
                                            <div class="gravatar-wrapper-32"><img
                                                    alt="Byron Katz&#39;s user avatar"
                                                    class="bar-sm avatar s-avatar--image" height="32" src="https://i.stack.imgur.com/lqC64.jpg?s=32&amp;g=1"
                                                    width="32"></div>
                                        </a>
                                        <div class="s-user-card--info">
                                            <a class="s-user-card--link" href="/users/713809/byron-katz">Byron Katz</a>
                                            <div class="s-user-card--awards lh-unset fc-black-500 fw-bold">
                                                <span class="reputation-score" dir="ltr"
                                                      title="reputation score ">500</span><span aria-hidden="true"
                                                                                title="5 silver badges"><span
                                                    class="badge2"></span><span class="badgecount">5</span></span><span
                                                    class="v-visible-sr">5 silver badges</span><span
                                                    aria-hidden="true" title="10 bronze badges"><span
                                                    class="badge3"></span><span class="badgecount">10</span></span><span
                                                    class="v-visible-sr">10 bronze badges</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="related-links flex--item p8">
                                        <a data-gps-track="site_switcher.click({ item_type:8 })"
                                           href="https://stackoverflow.com/users/logout">log out</a>
                                    </div>
                                </div>
                            </div>
                            <ul class="current-site">
                                <li class="d-flex">
                                    <div class="fl1">
                                        <a class="current-site-link d-flex gx8 site-link js-gps-track"
                                           data-gps-track="site_switcher.click({ item_type:3 })"
                                           data-id="1"
                                           href="https://stackoverflow.com">
                                            <div class="favicon favicon-stackoverflow site-icon flex--item"
                                                 title="Stack Overflow"></div>
                                            <span class="flex--item fl1">
            Stack Overflow
        </span>
                                        </a>

                                    </div>
                                    <div class="related-links">
                                        <a class="js-gps-track" data-gps-track="site_switcher.click({ item_type:14 })"
                                           href="https://stackoverflow.com/help">help</a>
                                        <a class="js-gps-track"
                                           data-gps-track="site_switcher.click({ item_type:6 })" href="https://chat.stackoverflow.com/?tab=site&amp;host=stackoverflow.com">chat</a>
                                        <a class="js-gps-track" data-gps-track="site_switcher.click({ item_type:8 })"
                                           href="https://stackoverflow.com/users/logout">log out</a>
                                    </div>

                                </li>
                                <li class="related-site d-flex">
                                    <div class="L-shaped-icon-container">
                                        <span class="L-shaped-icon"></span>
                                    </div>

                                    <a class="s-block-link px16 d-flex gx8 site-link js-gps-track"
                                       data-gps-track="site.switch({ target_site:552, item_type:3 }),site_switcher.click({ item_type:4 })"
                                       data-id="552"
                                       href="https://meta.stackoverflow.com">
                                        <div class="favicon favicon-stackoverflowmeta site-icon flex--item"
                                             title="Meta Stack Overflow"></div>
                                        <span class="flex--item fl1">
            Meta Stack Overflow
        </span>
                                    </a>

                                </li>
                            </ul>
                        </div>

                        <div class="header" id="your-communities-header">
                            <h3>
                                <a href="https://stackexchange.com/users/367545/?tab=accounts">your communities</a>
                            </h3>

                            <a href="#" id="edit-pinned-sites">edit</a>
                            <a href="#" id="cancel-pinned-sites" style="display: none;">cancel</a>
                        </div>
                        <div class="modal-content" id="your-communities-section">

                            <ul class="my-sites">
                                <li class="p0">
                                    <a class="s-block-link px16 d-flex gx8 site-link js-gps-track"
                                       data-gps-track="site.switch({ target_site:1, item_type:3 }),site_switcher.click({ item_type:1 })"
                                       data-id="1"
                                       href="https://stackoverflow.com">
                                        <div class="favicon favicon-stackoverflow site-icon flex--item"
                                             title="Stack Overflow"></div>
                                        <span class="flex--item fl1">
            Stack Overflow
        </span>
                                        <span class="rep-score flex--item">500</span>
                                    </a>

                                </li>
                                <li class="p0">
                                    <a class="s-block-link px16 d-flex gx8 site-link js-gps-track"
                                       data-gps-track="site.switch({ target_site:3, item_type:3 }),site_switcher.click({ item_type:1 })"
                                       data-id="3"
                                       href="https://superuser.com">
                                        <div class="favicon favicon-superuser site-icon flex--item"
                                             title="Super User"></div>
                                        <span class="flex--item fl1">
            Super User
        </span>
                                        <span class="rep-score flex--item">351</span>
                                    </a>

                                </li>
                                <li class="p0">
                                    <a class="s-block-link px16 d-flex gx8 site-link js-gps-track"
                                       data-gps-track="site.switch({ target_site:648, item_type:3 }),site_switcher.click({ item_type:1 })"
                                       data-id="648"
                                       href="https://retrocomputing.stackexchange.com">
                                        <div class="favicon favicon-retrocomputing site-icon flex--item"
                                             title="Retrocomputing"></div>
                                        <span class="flex--item fl1">
            Retrocomputing
        </span>
                                        <span class="rep-score flex--item">143</span>
                                    </a>

                                </li>
                                <li class="p0">
                                    <a class="s-block-link px16 d-flex gx8 site-link js-gps-track"
                                       data-gps-track="site.switch({ target_site:2, item_type:3 }),site_switcher.click({ item_type:1 })"
                                       data-id="2"
                                       href="https://serverfault.com">
                                        <div class="favicon favicon-serverfault site-icon flex--item"
                                             title="Server Fault"></div>
                                        <span class="flex--item fl1">
            Server Fault
        </span>
                                        <span class="rep-score flex--item">111</span>
                                    </a>

                                </li>
                                <li class="p0">
                                    <a class="s-block-link px16 d-flex gx8 site-link js-gps-track"
                                       data-gps-track="site.switch({ target_site:118, item_type:3 }),site_switcher.click({ item_type:1 })"
                                       data-id="118"
                                       href="https://apple.stackexchange.com">
                                        <div class="favicon favicon-apple site-icon flex--item"
                                             title="Ask Different"></div>
                                        <span class="flex--item fl1">
            Ask Different
        </span>
                                        <span class="rep-score flex--item">101</span>
                                    </a>

                                </li>
                            </ul>
                            <div class="pinned-site-editor-container" style="display: none;">
                                <input name="fkey" type="hidden"
                                       value="e4eb9ddaf12ea2d2a9fa3af2b81a4e28284a8553f2ae1b7f0f153630635d6de6">
                                <div class="d-flex p12">
                                    <div class="flex--item fl1 ps-relative">
                                        <input class="s-input s-input__sm w100 h100 site-filter-input"
                                               id="js-site-search-txt"
                                               placeholder="Add a Stack Exchange community"
                                               type="text"
                                               value=""/>
                                        <ul class="js-found-sites found-sites hmx1 l0 r0 ps-absolute overflow-y-auto"></ul>
                                    </div>
                                    <button class="ml8 s-btn s-btn__sm" disabled="disabled" id="pin-site-btn"
                                            type="submit">Add
                                    </button>
                                </div>
                                <ul class="pinned-site-list sortable" data-custom-list="False">
                                </ul>
                                <div class="d-flex p12 jc-end">
                                    <a class="flex--item s-btn s-btn__sm js-reset-pinned-sites" href="#">Reset</a>
                                    <button class="ml8 flex--item s-btn s-btn__filled s-btn__sm" disabled="disabled"
                                            id="save-pinned-sites-btn" type="submit">Save
                                    </button>
                                </div>
                            </div>
                        </div>

                        <div class="header">
                            <h3><a href="https://stackexchange.com/sites">more stack exchange communities</a>
                            </h3>
                            <a class="float-right" href="https://stackoverflow.blog">company blog</a>
                        </div>
                        <div class="modal-content">
                            <div class="child-content"></div>
                        </div>
                    </div>

                </li>

            </ol>
        </nav>


    </div>
</header>

<script>
    StackExchange.ready(function () { StackExchange.topbar.init(); });
		StackExchange.scrollPadding.setPaddingTop(50, 10);
</script>


<div class="container">


    <div class="left-sidebar js-pinned-left-sidebar ps-relative" data-is-here-when="md lg" id="left-sidebar">
        <div class="left-sidebar--sticky-container js-sticky-leftnav">
            <nav role="navigation">
                <ol class="nav-links">
                    <li>
                        <ol class="nav-links">


                            <li aria-current="false" class="ps-relative">


                                <a
                                        aria-controls=""
                                        aria-current="false"

                                        class="s-block-link pl8 js-gps-track nav-links--link -link__with-icon"
                                        data-controller="" data-gps-track="top_nav.click({is_current: false, location:2, destination:8,  has_activity_notification:False})" data-s-popover-auto-show="true"
                                        data-s-popover-hide-on-outside-click="never"
                                        data-s-popover-placement="right" href="/"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="svg-icon iconHome" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M15 10v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5H0l9-9 9 9h-3Zm-8 1v6h4v-6H7Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Home</span>

                                    </div>
                                </a>
                            </li>


                            <li aria-current="true" class="ps-relative  youarehere">


                                <a aria-controls=""
                                   aria-current="false"
                                   class="s-block-link pl8 js-gps-track nav-links--link -link__with-icon"

                                   data-controller=""
                                   data-gps-track="top_nav.click({is_current: true, location:2, destination:1,  has_activity_notification:False})" data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never"
                                   data-s-popover-placement="right"
                                   href="/questions" id="nav-questions"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="svg-icon iconQuestion" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="m4 15-3 3V4c0-1.1.9-2 2-2h12c1.09 0 2 .91 2 2v9c0 1.09-.91 2-2 2H4Zm7.75-3.97c.72-.83.98-1.86.98-2.94 0-1.65-.7-3.22-2.3-3.83a4.41 4.41 0 0 0-3.02 0 3.8 3.8 0 0 0-2.32 3.83c0 1.29.35 2.29 1.03 3a3.8 3.8 0 0 0 2.85 1.07c.62 0 1.2-.11 1.71-.34.65.44 1 .68 1.06.7.23.13.46.23.7.3l.59-1.13a5.2 5.2 0 0 1-1.28-.66Zm-1.27-.9a5.4 5.4 0 0 0-1.5-.8l-.45.9c.33.12.66.29.98.5-.2.07-.42.11-.65.11-.61 0-1.12-.23-1.52-.68-.86-1-.86-3.12 0-4.11.8-.9 2.35-.9 3.15 0 .9 1.01.86 3.03-.01 4.08Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Questions</span>

                                    </div>
                                </a>
                            </li>


                            <li aria-current="false" class="ps-relative">


                                <a
                                        aria-controls=""
                                        aria-current="false"

                                        class="s-block-link pl8 js-gps-track nav-links--link -link__with-icon"
                                        data-controller="" data-gps-track="top_nav.click({is_current: false, location:2, destination:2,  has_activity_notification:False})" data-s-popover-auto-show="true"
                                        data-s-popover-hide-on-outside-click="never"
                                        data-s-popover-placement="right" href="/tags"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="svg-icon iconTags" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M9.24 1a3 3 0 0 0-2.12.88l-5.7 5.7a2 2 0 0 0-.38 2.31 3 3 0 0 1 .67-1.01l6-6A3 3 0 0 1 9.83 2H14a3 3 0 0 1 .79.1A2 2 0 0 0 13 1H9.24Z"
                                                  opacity=".4"/>
                                            <path d="M9.83 3a2 2 0 0 0-1.42.59l-6 6a2 2 0 0 0 0 2.82L6.6 16.6a2 2 0 0 0 2.82 0l6-6A2 2 0 0 0 16 9.17V5a2 2 0 0 0-2-2H9.83ZM12 9a2 2 0 1 1 0-4 2 2 0 0 1 0 4Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Tags</span>

                                    </div>
                                </a>
                            </li>


                            <li class="pb24"></li>


                            <li aria-current="false" class="ps-relative">


                                <a
                                        aria-controls=""
                                        aria-current="false"

                                        class="s-block-link pl8 js-gps-track nav-links--link -link__with-icon"
                                        data-controller="" data-gps-track="top_nav.click({is_current: false, location:2, destination:8,  has_activity_notification:False})" data-s-popover-auto-show="true"
                                        data-s-popover-hide-on-outside-click="never"
                                        data-s-popover-placement="right" href="/users/saves/713809/all"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="svg-icon iconBookmark" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Saves</span>

                                    </div>
                                </a>
                            </li>


                            <li aria-current="false" class="ps-relative">


                                <a aria-controls=""
                                   aria-current="false"
                                   class="s-block-link pl8 js-gps-track nav-links--link -link__with-icon"

                                   data-controller=""
                                   data-gps-track="top_nav.click({is_current: false, location:2, destination:3,  has_activity_notification:False})" data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never"
                                   data-s-popover-placement="right"
                                   href="/users" id="nav-users"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="svg-icon iconPeople" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M17 14c0 .44-.45 1-1 1H9a1 1 0 0 1-1-1H2c-.54 0-1-.56-1-1 0-2.63 3-4 3-4s.23-.4 0-1c-.84-.62-1.06-.59-1-3 .06-2.42 1.37-3 2.5-3s2.44.58 2.5 3c.06 2.41-.16 2.38-1 3-.23.59 0 1 0 1s1.55.71 2.42 2.09c.78-.72 1.58-1.1 1.58-1.1s.23-.4 0-1c-.84-.61-1.06-.58-1-3 .06-2.41 1.37-3 2.5-3s2.44.59 2.5 3c.05 2.42-.16 2.39-1 3-.23.6 0 1 0 1s3 1.38 3 4Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Users</span>

                                    </div>
                                </a>
                            </li>


                            <li aria-current="false" class="ps-relative">


                                <a aria-controls=""
                                   aria-current="false"
                                   class="s-block-link pl8 js-gps-track nav-links--link -link__with-icon"

                                   data-controller=""
                                   data-gps-track="top_nav.click({is_current: false, location:2, destination:12,  has_activity_notification:False})" data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never"
                                   data-s-popover-placement="right"
                                   href="https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&amp;so_source=SiteNav" id="nav-companies"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="svg-icon iconBriefcase" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M5 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v1h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7c0-1.1.9-2 2-2h1V4Zm7 0H6v1h6V4Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Companies</span>

                                    </div>
                                </a>
                            </li>


                            <li class="ml8 mt32 mb8">
                                <a aria-controls="popover-labs-left-nav"
                                   class="s-link s-link d-flex fl-grow1 fc-black-400 h:fc-black-600 fs-fine"
                                   data-action="s-popover#toggle"
                                   data-controller="s-popover"
                                   data-s-popover-placement="top"
                                   data-s-popover-toggle-class="is-selected"
                                   href="javascript:void(0)"
                                   role="button"
                                >
                                    <div class="flex--item fl-grow1 tt-uppercase fc-black-600 fw-bold">Labs</div>
                                    <div class="flex--item px12">
                                        <svg aria-hidden="true" class="svg-icon iconInfoSm" height="14" viewBox="0 0 14 14"
                                             width="14">
                                            <path d="M7 1a6 6 0 1 1 0 12A6 6 0 0 1 7 1Zm1 10V6H6v5h2Zm0-6V3H6v2h2Z"/>
                                        </svg>
                                    </div>
                                </a>
                            </li>


                            <li aria-current="false" class="ps-relative">


                                <a aria-controls=""
                                   aria-current="false"
                                   class="s-block-link pl8 ai-center js-gps-track nav-links--link -link__with-icon"

                                   data-controller=""
                                   data-gps-track="top_nav.click({is_current: false, location:2, destination:24,  has_activity_notification:False})" data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never"
                                   data-s-popover-placement="right"
                                   href="/beta/discussions" id="nav-labs-discussions"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="w16 svg-icon iconMessage" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M5 7a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm1 2a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2H6Zm-5 9V4c0-1.1.9-2 2-2h12c1.09 0 2 .91 2 2v9c0 1.09-.91 2-2 2H4.5L1 18Zm2.76-5h11.23a.06.06 0 0 0 0-.01H15V4a.06.06 0 0 0-.01-.01H3v9.65l.76-.65Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Discussions</span>

                                        <div class="ps-absolute flex--item r2 mx4 ml-auto">
                                            <div class="bar-sm bg-purple-100 fc-purple-400 fs-fine fw-bold px4 py2 lh-unset tt-uppercase">
                                                New
                                            </div>
                                        </div>
                                    </div>
                                </a>
                            </li>


                            <li class="ml8 mt32 mb8">
                                <div class="d-flex jc-space-between ai-center">
                                    <a
                                            aria-controls="popover-discover-collectives"
                                            class="s-link d-flex fl-grow1 fc-black-400 h:fc-black-600 fs-fine js-collectives-navcta-toggle"
                                            data-action="s-popover#toggle"
                                            data-controller="s-popover"
                                            data-gps-track="top_nav.click({is_current:false, location:2, destination:17})"
                                            data-s-popover-placement="top"
                                            data-s-popover-toggle-class="is-selected"
                                            href="javascript:void(0)"
                                            role="button"
                                    >
                                        <div class="flex--item fl-grow1 tt-uppercase fc-black-600 fw-bold">Collectives
                                        </div>
                                        <div class="flex--item px12">
                                            <svg aria-hidden="true" class="svg-icon iconPlusSm" height="14" viewBox="0 0 14 14"
                                                 width="14">
                                                <path d="M8 2H6v4H2v2h4v4h2V8h4V6H8V2Z"/>
                                            </svg>
                                        </div>
                                    </a>

                                </div>

                            </li>


                            <li aria-current="false" class="ps-relative">


                                <a aria-controls=""
                                   aria-current="false"
                                   class="s-block-link pl8 ai-center js-collectives-navcta-toggle js-gps-track nav-links--link -link__with-icon"

                                   data-controller=""
                                   data-gps-track="top_nav.click({is_current: false, location:2, destination:18,  has_activity_notification:False})" data-s-popover-auto-show="true" data-s-popover-hide-on-outside-click="never"
                                   data-s-popover-placement="right"
                                   href="/collectives" id="nav-collective-discover"
                                >
                                    <div class="d-flex ai-center">
                                        <svg aria-hidden="true" class="mt-auto fc-orange-400 svg-icon iconStarVerified"
                                             height="18" viewBox="0 0 18 18" width="18">
                                            <path d="M9.86.89a1.14 1.14 0 0 0-1.72 0l-.5.58c-.3.35-.79.48-1.23.33l-.72-.25a1.14 1.14 0 0 0-1.49.85l-.14.76c-.1.45-.45.8-.9.9l-.76.14c-.67.14-1.08.83-.85 1.49l.25.72c.15.44.02.92-.33 1.23l-.58.5a1.14 1.14 0 0 0 0 1.72l.58.5c.35.3.48.79.33 1.23l-.25.72c-.23.66.18 1.35.85 1.49l.76.14c.45.1.8.45.9.9l.14.76c.14.67.83 1.08 1.49.85l.72-.25c.44-.15.92-.02 1.23.33l.5.58c.46.52 1.26.52 1.72 0l.5-.58c.3-.35.79-.48 1.23-.33l.72.25c.66.23 1.35-.18 1.49-.85l.14-.76c.1-.45.45-.8.9-.9l.76-.14c.67-.14 1.08-.83.85-1.49l-.25-.72c-.15-.44-.02-.92.33-1.23l.58-.5c.52-.46.52-1.26 0-1.72l-.58-.5c-.35-.3-.48-.79-.33-1.23l.25-.72a1.14 1.14 0 0 0-.85-1.49l-.76-.14c-.45-.1-.8-.45-.9-.9l-.14-.76a1.14 1.14 0 0 0-1.49-.85l-.72.25c-.44.15-.92.02-1.23-.33l-.5-.58Zm-.49 2.67L10.6 6.6c.05.15.19.24.34.25l3.26.22c.36.03.5.48.23.71l-2.5 2.1a.4.4 0 0 0-.14.4l.8 3.16a.4.4 0 0 1-.6.44L9.2 12.13a.4.4 0 0 0-.42 0l-2.77 1.74a.4.4 0 0 1-.6-.44l.8-3.16a.4.4 0 0 0-.13-.4l-2.5-2.1a.4.4 0 0 1 .22-.7l3.26-.23a.4.4 0 0 0 .34-.25l1.22-3.03a.4.4 0 0 1 .74 0Z"/>
                                        </svg>
                                        <span class="-link--channel-name pl6">Explore Collectives</span>

                                    </div>
                                </a>
                            </li>


                        </ol>
                    </li>


                    <li class="d-flex ai-center jc-space-between ml8 mt32 mb8 js-create-team-cta">
                        <a aria-controls="popover-teams-create-cta"
                           class="s-link d-flex fl-grow1 fc-black-400 h:fc-black-600 fs-fine js-gps-track"
                           data-action="s-popover#toggle"
                           data-controller="s-popover"
                           data-ga="[&quot;teams left navigation&quot;,&quot;left nav show teams info&quot;,null,null,null]"
                           data-gps-track="teams.create.left-sidenav.click({ Action: ShowInfo })"
                           data-s-popover-placement="bottom-start"
                           data-s-popover-toggle-class="is-selected"
                           href="javascript:void(0)"
                           role="button"
                        >
                            <div class="flex--item fl-grow1 fc-black-600 fw-bold tt-uppercase">Teams</div>
                            <div class="flex--item px12">
                                <svg aria-hidden="true" class="svg-icon iconPlusSm" height="14" viewBox="0 0 14 14"
                                     width="14">
                                    <path d="M8 2H6v4H2v2h4v4h2V8h4V6H8V2Z"/>
                                </svg>
                            </div>
                        </a>
                    </li>
                    <li class="ps-relative js-create-team-cta">
                        <a class="s-block-link pl8 js-gps-track nav-links--link"
                           data-ga="[&quot;teams left navigation&quot;,&quot;left nav team click&quot;,&quot;stackoverflow.com/teams/create/free&quot;,null,null]"
                           data-gps-track="teams.create.left-sidenav.click({ Action: FreemiumTeamsCreateClick })"
                           href="https://stackoverflowteams.com/teams/create/free/?utm_source=so-owned&amp;utm_medium=side-bar&amp;utm_campaign=campaign-38&amp;utm_content=cta"
                           title="Stack Overflow for Teams is a private, secure spot for your organization's questions and answers.">
                            <div class="d-flex ai-center">
                                <div class="flex--item s-avatar va-middle bg-orange-400">
                                    <div class="s-avatar--letter mtn1">
                                        <svg aria-hidden="true" class="svg-icon iconBriefcaseSm" height="14" viewBox="0 0 14 14"
                                             width="14">
                                            <path d="M4 3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v1h.5c.83 0 1.5.67 1.5 1.5v5c0 .83-.67 1.5-1.5 1.5h-7A1.5 1.5 0 0 1 2 10.5v-5C2 4.67 2.67 4 3.5 4H4V3Zm5 1V3H5v1h4Z"/>
                                        </svg>
                                    </div>
                                    <svg aria-hidden="true" class="native s-avatar--badge svg-icon iconShieldXSm"
                                         height="10" viewBox="0 0 9 10" width="9">
                                        <path d="M0 1.84 4.5 0 9 1.84v3.17C9 7.53 6.3 10 4.5 10 2.7 10 0 7.53 0 5.01V1.84Z"
                                              fill="var(--white)"/>
                                        <path d="M1 2.5 4.5 1 8 2.5v2.51C8 7.34 5.34 9 4.5 9 3.65 9 1 7.34 1 5.01V2.5Zm2.98 3.02L3.2 7h2.6l-.78-1.48a.4.4 0 0 1 .15-.38c.34-.24.73-.7.73-1.14 0-.71-.5-1.23-1.41-1.23-.92 0-1.39.52-1.39 1.23 0 .44.4.9.73 1.14.12.08.18.23.15.38Z"
                                              fill="var(--black-400)"/>
                                    </svg>
                                </div>
                                <div class="flex--item pl6">
                                    Create free Team
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="mt8 px8">
                        <button aria-controls="teams-were-moved-popover"
                                aria-expanded="false"
                                class="s-btn s-btn__outlined s-btn__sm w100 px0 js-gps-track"
                                data-action="s-popover#toggle"
                                data-controller="s-popover"
                                data-gps-track="teams.sot_migration_notification_teams_moved.click()"
                                data-s-popover-placement="bottom-start">
                            Looking for your Teams?
                        </button>
                    </li>

                </ol>
            </nav>
        </div>

        <div class="s-popover mt4 ws3"
             id="teams-were-moved-popover"
             role="menu">
            <div class="s-popover--arrow"></div>
            <p id="testing-target">Stack Overflow for Teams has its own domain!</p>
            <p>You can now access your Teams at <a class="s-link fs-italic" href="https://stackoverflowteams.com">stackoverflowteams.com</a>.
                Teams no longer appear in the left sidebar on <span class="fs-italic">stackoverflow.com</span>. Check
                your email to learn more about these changes.</p>
        </div>

        <div class="s-popover ws2" id="popover-discover-collectives" role="menu">
            <div class="s-popover--arrow"></div>
            <div>
                <svg aria-hidden="true" class="fc-orange-400 float-right ml24 svg-spot spotCollective" height="48"
                     viewBox="0 0 48 48" width="48">
                    <path d="M25.5 7a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM14 18.25c0-.69.56-1.25 1.25-1.25h22.5c.69 0 1.25.56 1.25 1.25V37.5a1 1 0 0 1-1.6.8l-4.07-3.05a1.25 1.25 0 0 0-.75-.25H15.25c-.69 0-1.25-.56-1.25-1.25v-15.5ZM7 24.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0ZM25.5 48a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM48 24.5a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"
                          opacity=".2"/>
                    <path d="M21 3.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0ZM24.5 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM0 23.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0ZM3.5 22a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3ZM21 44.5a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0Zm3.5-1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Zm20-23a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7ZM43 23.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm-23.23-3.14a1 1 0 0 1-.13 1.4l-2.08 1.74 2.08 1.73a1 1 0 1 1-1.28 1.54l-2.42-2.02a1.63 1.63 0 0 1 0-2.5l2.42-2.02a1 1 0 0 1 1.4.13Zm7.59 1.41a1 1 0 1 1 1.28-1.54l2.42 2.02c.78.65.78 1.85 0 2.5l-2.42 2.02a1 1 0 1 1-1.28-1.54l2.08-1.73-2.08-1.73ZM24.12 18a1 1 0 0 1 .87 1.12l-1 8a1 1 0 1 1-1.98-.24l1-8a1 1 0 0 1 1.11-.87Zm-11.87-5C11.01 13 10 14 10 15.25v15.5c0 1.24 1 2.25 2.25 2.25h17.33c.06 0 .11.02.15.05l4.07 3.05a2 2 0 0 0 3.2-1.6V15.25c0-1.24-1-2.25-2.25-2.25h-22.5ZM12 15.25c0-.14.11-.25.25-.25h22.5c.14 0 .25.11.25.25V34.5l-4.07-3.05a2.2 2.2 0 0 0-1.35-.45H12.25a.25.25 0 0 1-.25-.25v-15.5Zm7.24-10.68a1 1 0 1 0-.48-1.94A22.04 22.04 0 0 0 2.91 17.7a1 1 0 1 0 1.92.58 20.04 20.04 0 0 1 14.4-13.72Zm11.05-1.66a1 1 0 0 0-.58 1.92c6.45 1.92 11.54 7 13.46 13.46a1 1 0 1 0 1.92-.58 22.05 22.05 0 0 0-14.8-14.8ZM4.57 28.76a1 1 0 0 0-1.94.48 22.03 22.03 0 0 0 16.13 16.13 1 1 0 1 0 .48-1.94A20.03 20.03 0 0 1 4.57 28.76Zm40.8.48a1 1 0 1 0-1.94-.48 20.04 20.04 0 0 1-13.72 14.41 1 1 0 0 0 .58 1.92 22.04 22.04 0 0 0 15.08-15.85Z"/>
                </svg>
                <h5 class="pt4 fw-bold">Collectives™ on Stack Overflow</h5>
                <p class="my16 fs-caption fc-black-500">Find centralized, trusted content and collaborate around the
                    technologies you use most.</p>
                <a class="js-gps-track s-btn s-btn__filled s-btn__xs"
                   data-gps-track="top_nav.click({is_current:false, location:2, destination:18})"
                   href="/collectives">
                    Learn more about Collectives
                </a>
            </div>
        </div>

        <div aria-hidden="true"
             class="s-popover ws2"
             id="popover-teams-create-cta"
             role="menu">
            <div class="s-popover--arrow"></div>

            <div class="ps-relative overflow-hidden">
                <p class="mb2"><strong>Teams</strong></p>
                <p class="mb12 fs-caption fc-black-400">Q&amp;A for work</p>
                <p class="mb12 fs-caption fc-black-500">Connect and share knowledge within a single location that is
                    structured and easy to search.</p>
                <a class="js-gps-track s-btn s-btn__filled s-btn__xs"
                   data-ga="[&quot;teams left navigation&quot;,&quot;left nav cta&quot;,&quot;stackoverflow.com/teams&quot;,null,null]"
                   data-gps-track="teams.create.left-sidenav.click({ Action: CtaClick })"
                   href="https://stackoverflow.co/teams/">
                    Learn more about Teams
                </a>
            </div>

            <div class="ps-absolute t8 r8">
                <svg aria-hidden="true" class="fc-orange-400 svg-spot spotPeople" height="48" viewBox="0 0 48 48"
                     width="48">
                    <path d="M13.5 28a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9ZM7 30a1 1 0 0 1 1-1h11a1 1 0 0 1 1 1v5h11v-5a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v10a2 2 0 0 1-2 2H33v5a1 1 0 0 1-1 1H20a1 1 0 0 1-1-1v-5H8a1 1 0 0 1-1-1V30Zm25-6.5a4.5 4.5 0 1 0 9 0 4.5 4.5 0 0 0-9 0ZM24.5 34a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z"
                          opacity=".2"/>
                    <path d="M16.4 26.08A6 6 0 1 0 7.53 26C5.64 26.06 4 27.52 4 29.45V40a1 1 0 0 0 1 1h9a1 1 0 1 0 0-2h-4v-7a1 1 0 1 0-2 0v7H6v-9.55c0-.73.67-1.45 1.64-1.45H16a1 1 0 0 0 .4-1.92ZM12 18a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm16.47 14a6 6 0 1 0-8.94 0A3.6 3.6 0 0 0 16 35.5V46a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V35.5c0-1.94-1.64-3.42-3.53-3.5ZM20 28a4 4 0 1 1 8 0 4 4 0 0 1-8 0Zm-.3 6h8.6c1 0 1.7.75 1.7 1.5V45h-2v-7a1 1 0 1 0-2 0v7h-4v-7a1 1 0 1 0-2 0v7h-2v-9.5c0-.75.7-1.5 1.7-1.5ZM42 22c0 1.54-.58 2.94-1.53 4A3.5 3.5 0 0 1 44 29.45V40a1 1 0 0 1-1 1h-9a1 1 0 1 1 0-2h4v-7a1 1 0 1 1 2 0v7h2v-9.55A1.5 1.5 0 0 0 40.48 28H32a1 1 0 0 1-.4-1.92A6 6 0 1 1 42 22Zm-2 0a4 4 0 1 0-8 0 4 4 0 0 0 8 0Z"/>
                    <g opacity=".35">
                        <path d="M17 10a1 1 0 011-1h12a1 1 0 110 2H18a1 1 0 01-1-1Zm1-5a1 1 0 100 2h12a1 1 0 100-2H18ZM14 1a1 1 0 00-1 1v12a1 1 0 001 1h5.09l4.2 4.2a1 1 0 001.46-.04l3.7-4.16H34a1 1 0 001-1V2a1 1 0 00-1-1H14Zm1 12V3h18v10h-5a1 1 0 00-.75.34l-3.3 3.7-3.74-3.75a1 1 0 00-.71-.29H15Z"/>
                    </g>
                </svg>
            </div>
        </div>

        <div aria-hidden="true"
             class="s-popover ws2"
             id="popover-labs-left-nav"
             role="menu">
            <div class="s-popover--arrow"></div>
            <svg aria-hidden="true" class="fc-black-600 mb8 svg-icon iconLabs" height="18" width="42">
                <path d="M11.5 13.624a.374.374 0 0 1-.37.376H5.361a.374.374 0 0 1-.37-.376V4.376c0-.207.165-.376.37-.376H6.62c.204 0 .37.169.37.376v7.611h4.138c.205 0 .371.169.371.377v1.26zm9.432.215c-.07.1-.185.161-.308.161H19.13a.376.376 0 0 1-.356-.254l-.55-1.7h-3.111l-.55 1.7a.377.377 0 0 1-.355.254h-1.494a.376.376 0 0 1-.353-.506l3.39-9.247A.376.376 0 0 1 16.103 4h1.13c.158 0 .299.099.353.247l3.39 9.247a.376.376 0 0 1-.045.345zm-4.157-7.386l-1.219 3.531h2.266l-1.047-3.53zm13.335 5.71a.37.37 0 0 0-.003.524c.956.971 2.047 1.313 3.486 1.313 1.014 0 1.92-.265 2.582-.788.67-.53 1.063-1.306 1.063-2.255 0-.855-.268-1.622-.867-2.145-.456-.41-1.008-.633-1.89-.767l-1.037-.153c-.377-.057-.672-.19-.832-.332-.146-.132-.221-.315-.221-.568 0-.309.11-.56.306-.737.199-.179.518-.312.986-.312.708 0 1.254.151 1.726.601a.37.37 0 0 0 .516-.004l.883-.87a.37.37 0 0 0-.008-.534C35.942 4.334 35.004 4 33.721 4c-1.016 0-1.872.292-2.479.836-.61.548-.935 1.32-.935 2.207 0 .82.243 1.502.781 2.01h.001c.468.437 1.135.716 1.93.826l1.072.153c.508.073.647.147.795.286l.008.007c.14.125.234.34.234.67 0 .332-.124.567-.344.73-.235.174-.617.293-1.165.293-.867 0-1.49-.185-2.066-.76a.37.37 0 0 0-.522-.003l-.92.908zM22.37 14a.374.374 0 0 1-.37-.376V4.376c0-.207.166-.376.37-.376h3.543c.913 0 1.697.264 2.257.78.564.519.863 1.259.863 2.129 0 .845-.377 1.524-.87 1.947.57.433 1.01 1.145 1.01 2.157 0 .941-.317 1.702-.894 2.224-.57.517-1.354.763-2.225.763H22.37zm3.543-1.977c.96 0 .959-1.01.959-1.01s0-1.013-.959-1.013H24v2.023h1.913zm-.115-4.063c1.074 0 1.074-1.015 1.074-1.015s0-1.016-1.074-1.016H24V7.96h1.798z"
                      fill="var(--black-600)"/>
                <path d="M0 4v10a4 4 0 0 0 4 4h34a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4H4a4 4 0 0 0-4 4zm4-2h34a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z"
                      fill="var(--black-600)"/>
            </svg>
            <p class="fs-caption">Get early access and see previews of new features.</p>
            <a class="s-btn s-btn__filled s-btn__xs s-btn__icon fs-fine" href="https://stackoverflow.co/labs/">
                <svg aria-hidden="true" class="svg-icon iconShareSm" height="14" viewBox="0 0 14 14" width="14">
                    <path d="M5 1H3a2 2 0 0 0-2 2v8c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V9h-2v2H3V3h2V1Zm2 0h6v6h-2V4.5L6.5 9 5 7.5 9.5 3H7V1Z"/>
                </svg>
                Learn more about Labs</a>
        </div>


    </div>


    <div class="snippet-hidden" id="content">


        <div itemprop="mainEntity" itemscope itemtype="https://schema.org/Question">
            <link href="https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a"
                  itemprop="image">

            <div class="inner-content clearfix">


                <div class="d-flex sm:fd-column" id="question-header">
                    <h1 class="fs-headline1 ow-break-word mb8 flex--item fl1" itemprop="name"><a
                            class="question-hyperlink"
                            href="/questions/113780/javascript-curry-what-are-the-practical-applications">JavaScript curry: what are the practical applications?</a></h1>

                    <div class="ml12 aside-cta flex--item sm:ml0 sm:mb12 sm:order-first d-flex jc-end">

                        <div class="ml12 aside-cta flex--item print:d-none">
                            <a class="ws-nowrap s-btn s-btn__filled" href="/questions/ask">
                                Ask Question
                            </a>

                        </div>
                    </div>
                </div>
                <div class="d-flex fw-wrap pb8 mb16 bb bc-black-200">
                    <div class="flex--item ws-nowrap mr16 mb8" title="2008-09-22 08:22:06Z">
                        <span class="fc-black-400 mr2">Asked</span>
                        <time datetime="2008-09-22T08:22:06" itemprop="dateCreated">15 years, 6 months ago</time>
                    </div>
                    <div class="flex--item ws-nowrap mr16 mb8">
                        <span class="fc-black-400 mr2">Modified</span>
                        <a class="s-link s-link__inherit" href="?lastactivity" title="2023-08-02 01:29:17Z">7 months
                            ago</a>
                    </div>
                    <div class="flex--item ws-nowrap mb8" title="Viewed 49,445 times">
                        <span class="fc-black-400 mr2">Viewed</span>
                        49k times
                    </div>
                </div>

                <div aria-label="question and answers" id="mainbar" role="main">

                    <div class="question js-question" data-position-on-page="0" data-questionid="113780"
                         data-score="191" id="question">


                        <div class="post-layout ">
                            <div class="votecell post-layout--left">
                                <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                     data-post-id="113780" data-referrer="None">
                                    <button aria-label="Up vote"
                                            aria-pressed="false"
                                            class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                            data-controller="s-tooltip"
                                            data-s-tooltip-placement="right"
                                            data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                            data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                            title="This question shows research effort; it is useful and clear">
                                        <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M1 12h16L9 4l-8 8Z"/>
                                        </svg>
                                    </button>
                                    <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                         data-value="191"
                                         itemprop="upvoteCount">
                                        191
                                    </div>
                                    <button aria-label="Down vote"
                                            aria-pressed="false"
                                            class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                            data-controller="s-tooltip"
                                            data-s-tooltip-placement="right"
                                            data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                            data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                            title="This question does not show any research effort; it is unclear or not useful">
                                        <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M1 6h16l-8 8-8-8Z"/>
                                        </svg>
                                    </button>


                                    <button aria-controls=""
                                            aria-pressed="false"
                                            class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                            data-controller="s-tooltip"
                                            data-post-id="113780"
                                            data-post-type-id="1"
                                            data-s-popover-auto-show="false"
                                            data-s-popover-placement=""
                                            data-s-tooltip-placement="right"
                                            data-user-privilege-for-post-click="27"
                                            id="saves-btn-113780"
                                            title="Save this question."
                                            type="button"
                                    >
                                        <svg aria-hidden="true"
                                             class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                             height="18" viewBox="0 0 18 18" width="18">
                                            <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                        </svg>
                                        <svg aria-hidden="true" class="js-saves-btn-unselected svg-icon iconBookmarkAlt"
                                             height="18" viewBox="0 0 18 18" width="18">
                                            <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                        </svg>
                                    </button>


                                    <a aria-label="Timeline"
                                       class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                       data-s-tooltip-placement="right" data-shortcut="T"
                                       href="/posts/113780/timeline" title="Show activity on this post.">
                                        <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                             viewBox="0 0 19 18" width="19">
                                            <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                        </svg>
                                    </a>

                                </div>

                            </div>


                            <div class="postcell post-layout--right">

                                <div class="s-prose js-post-body" itemprop="text">

                                    <p>I don’t think I’ve grokked currying yet. I understand what it does, and how to do
                                        it. I just can’t think of a situation I would use it.</p>
                                    <p>Where are you using currying in JavaScript (or where are the main libraries using
                                        it)? DOM manipulation or general application development examples welcome.</p>
                                    <p>
                                        <a href="https://stackoverflow.com/questions/113780/javascript-curry-what-are-the-practical-applications#113799">One
                                            of the answers</a> mentions animation. Functions like <code>slideUp</code>,
                                        <code>fadeIn</code> take an element as an arguments and are normally a curried
                                        function returning the high order function with the default “animation function”
                                        built-in. Why is that better than just applying the higher-up function with some
                                        defaults?</p>
                                    <p>Are there any drawbacks to using it?</p>
                                    <p>As requested here are some good resources on JavaScript currying:</p>
                                    <ul>
                                        <li><a href="http://www.dustindiaz.com/javascript-curry/"
                                               rel="nofollow noreferrer">http://www.dustindiaz.com/javascript-curry/</a>
                                        </li>
                                        <li>Crockford, Douglas (2008) <em>JavaScript: The Good Parts</em></li>
                                        <li>
                                            <a href="http://www.crockford.com/javascript/www_svendtofte_com/code/curried_javascript/index.html"
                                               rel="nofollow noreferrer">http://www.svendtofte.com/code/curried_javascript/</a>
                                            (Takes a detour into ML so skip the whole section from “A crash course in
                                            ML” and start again at “How to write curried JavaScript”)
                                        </li>
                                        <li>
                                            <a href="http://web.archive.org/web/20111217011630/http://blog.morrisjohns.com:80/javascript_closures_for_dummies"
                                               rel="nofollow noreferrer">http://web.archive.org/web/20111217011630/http://blog.morrisjohns.com:80/javascript_closures_for_dummies</a>
                                        </li>
                                        <li>
                                            <a href="https://stackoverflow.com/questions/111102/how-does-a-javascript-closure-work">How
                                                do JavaScript closures work?</a></li>
                                        <li><strong><a
                                                href="https://johnresig.com/blog/partial-functions-in-javascript/"
                                                rel="nofollow noreferrer">https://johnresig.com/blog/partial-functions-in-javascript</a>
                                            (Mr. Resig on the money as per usual)</strong></li>
                                        <li>
                                            <a href="http://benalman.com/news/2010/09/partial-application-in-javascript/"
                                               rel="nofollow noreferrer">http://benalman.com/news/2010/09/partial-application-in-javascript/</a>
                                        </li>
                                    </ul>
                                    <p>I’ll add more as they crop up in the comments.</p>
                                    <hr/>
                                    <p>So, according to the answers, currying and partial application in general are
                                        convenience techniques.</p>
                                    <p>If you are frequently “refining” a high-level function by calling it with same
                                        configuration, you can curry (or use Resig’s partial) the higher-level function
                                        to create simple, concise helper methods.</p>
                                </div>

                                <div class="mt24 mb12">
                                    <div class="post-taglist d-flex gs4 gsy fd-column">
                                        <div class="d-flex ps-relative fw-wrap">

                                            <ul class='ml0 list-ls-none js-post-tag-list-wrapper d-inline'>
                                                <li class='d-inline mr4 js-post-tag-list-item'><a
                                                        aria-label="show questions tagged &#39;javascript&#39;" aria-labelledby="tag-javascript-tooltip-container"
                                                        class="post-tag"
                                                        href="/questions/tagged/javascript"
                                                        rel="tag" title="show questions tagged &#39;javascript&#39;">javascript</a>
                                                </li>
                                                <li class='d-inline mr4 js-post-tag-list-item'><a
                                                        aria-label="show questions tagged &#39;function&#39;" aria-labelledby="tag-function-tooltip-container"
                                                        class="post-tag"
                                                        href="/questions/tagged/function" rel="tag"
                                                        title="show questions tagged &#39;function&#39;">function</a>
                                                </li>
                                                <li class='d-inline mr4 js-post-tag-list-item'><a
                                                        aria-label="show questions tagged &#39;currying&#39;" aria-labelledby="tag-currying-tooltip-container"
                                                        class="post-tag"
                                                        href="/questions/tagged/currying" rel="tag"
                                                        title="show questions tagged &#39;currying&#39;">currying</a>
                                                </li>
                                                <li class='d-inline mr4 js-post-tag-list-item'><a
                                                        aria-label="show questions tagged &#39;partial-application&#39;" aria-labelledby="tag-partial-application-tooltip-container"
                                                        class="post-tag"
                                                        href="/questions/tagged/partial-application"
                                                        rel="tag"
                                                        title="show questions tagged &#39;partial-application&#39;">partial-application</a>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </div>

                                <div class="mb0 ">
                                    <div class="mt16 d-flex gs8 gsy fw-wrap jc-end ai-start pt4 mb16">
                                        <div class="flex--item mr16 fl1 w96">


                                            <div class="js-post-menu pt2" data-post-id="113780" data-post-type-id="1">

                                                <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                    <div class="flex--item">
                                                        <a class="js-share-link js-gps-track"
                                                           data-controller="se-share-sheet"
                                                           data-gps-track="post.click({ item: 2, priv: 27, post_type: 1 })"
                                                           data-s-popover-placement="bottom-start"
                                                           data-se-share-sheet-license-name="CC BY-SA 4.0"
                                                           data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f"
                                                           data-se-share-sheet-location="1"
                                                           data-se-share-sheet-post-type="question"
                                                           data-se-share-sheet-social="facebook twitter devto"
                                                           data-se-share-sheet-subtitle="(Includes your user id)"
                                                           data-se-share-sheet-title="Share a link to this question"
                                                           href="/q/113780/713809"
                                                           itemprop="url"
                                                           rel="nofollow"
                                                           title="Short permalink to this question">Share</a>
                                                    </div>


                                                    <div class="flex--item">
                                                        <a class="js-edit-post js-gps-track" data-gps-track="post.click({ item: 6, priv: 27, post_type: 1 })"
                                                           href="/posts/113780/edit"
                                                           title="Revise and improve this post">Edit</a>
                                                    </div>

                                                    <div class="flex--item">
                                                        <button aria-controls=""
                                                                class="s-btn s-btn__link js-follow-post js-follow-question js-gps-track"
                                                                data-controller="s-tooltip "
                                                                data-gps-track="post.click({ item: 14, priv: 27, post_type: 1 })"
                                                                data-s-popover-placement="bottom"
                                                                data-s-tooltip-placement="bottom"
                                                                id="btnFollowPost-113780" title="Follow this question to receive notifications"
                                                                type="button">
                                                            Follow
                                                        </button>
                                                    </div>


                                                    <div class="flex--item">
                                                        <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                data-gps-track="post.click({ item: 5, priv: 27, post_type: 1 })"
                                                                title="Flag this post for serious problems or moderator attention"
                                                                type="button">
                                                            Flag
                                                        </button>
                                                    </div>


                                                </div>
                                                <div class="js-menu-popup-container"></div>
                                            </div>
                                        </div>

                                        <div class="post-signature flex--item">
                                            <div class="user-info ">
                                                <div class="d-flex ">
                                                    <div class="user-action-time fl-grow1">
                                                        <a class="js-gps-track"
                                                           data-gps-track="post.click({ item: 4, priv: 27, post_type: 1 })"
                                                           href="/posts/113780/revisions"
                                                           title="show all edits to this post">edited
                                                            <span class='relativetime' title='2023-08-02 01:29:17Z'>Aug 2, 2023 at 1:29</span></a>
                                                    </div>

                                                </div>
                                                <div class="user-gravatar32">

                                                </div>
                                                <div class="user-details">

                                                    <div class="-flair">

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="post-signature flex--item">
                                            <div class="user-info">
                                                <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Sep 24, 2008 at 16:11. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                </div>
                                                <br>
                                                <div class="user-details">
                                                    <a href="/posts/113780/revisions" id="history-113780"
                                                       title="show revision history for this post">
                                                        19 revs, 10 users 30%<br><a href="/users/9474">Dave Nolan</a>
                                                    </a>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>

                            </div>


                            <span class="d-none" itemprop="commentCount">5</span>
                            <div class="post-layout--right js-post-comments-component">
                                <div class="comments js-comments-container bt bc-black-200 mt12 " data-min-length="15"
                                     data-post-id="113780" id="comments-113780">
                                    <ul class="comments-list js-comments-list"
                                        data-addlink-disabled="false"
                                        data-canpost="true"
                                        data-cansee="false"
                                        data-comments-unavailable="false"
                                        data-remaining-comments-count="0">

                                        <li class="comment js-comment " data-comment-id="23039" data-comment-owner-id="3957"
                                            data-comment-score="0" id="comment-23039">
                                            <div class="js-comment-actions comment-actions">
                                                <div class="comment-score js-comment-score js-comment-edit-hide">
                                                </div>
                                                <div class="comment-voting mtn2 js-comment-edit-hide">
                                                    <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                       role="button" tabindex="0"
                                                       title="This comment adds something useful to the post">
                                                        <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M1 12h16L9 4l-8 8Z"/>
                                                        </svg>
                                                    </a>
                                                </div>
                                                <div class="comment-flagging js-comment-edit-hide">
                                                    <button aria-label="Flag Comment"
                                                            aria-pressed="false"
                                                            class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                            title="Flag this comment for serious problems or moderator attention">
                                                        <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="comment-text  js-comment-text-and-form">
                                                <div class="comment-body js-comment-edit-hide">

                                                    <span class="comment-copy">can you add a link to a resource that describes what JS currying is? a tutorial or a blog post would be great.</span>

                                                    <div class="d-inline-flex ai-center">
                                                        &ndash;&nbsp;<a class="comment-user"
                                                                        href="/users/3957/eric-schoonover"
                                                                        title="47,784 reputation">Eric Schoonover</a>
                                                    </div>
                                                    <span class="comment-date" dir="ltr"><span
                                                            class='relativetime-clean'
                                                            title='2008-09-22 08:31:00Z, License: CC BY-SA 2.5'>Sep 22, 2008 at 8:31</span></span>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="comment js-comment " data-comment-id="30149" data-comment-owner-id="12663"
                                            data-comment-score="2" id="comment-30149">
                                            <div class="js-comment-actions comment-actions">
                                                <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">2</span>
                                                </div>
                                                <div class="comment-voting mtn2 js-comment-edit-hide">
                                                    <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                       role="button" tabindex="0"
                                                       title="This comment adds something useful to the post">
                                                        <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M1 12h16L9 4l-8 8Z"/>
                                                        </svg>
                                                    </a>
                                                </div>
                                                <div class="comment-flagging js-comment-edit-hide">
                                                    <button aria-label="Flag Comment"
                                                            aria-pressed="false"
                                                            class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                            title="Flag this comment for serious problems or moderator attention">
                                                        <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="comment-text  js-comment-text-and-form">
                                                <div class="comment-body js-comment-edit-hide">

                                                    <span class="comment-copy">svendtofte.com is longwinded but if you skip the whole section from &quot;A crash course in ML&quot; and start again at &quot;How to write curried JavaScript&quot; it becomes a great introduction to currying in js.</span>

                                                    <div class="d-inline-flex ai-center">
                                                        &ndash;&nbsp;<a class="comment-user"
                                                                        href="/users/12663/danio"
                                                                        title="8,615 reputation">danio</a>
                                                    </div>
                                                    <span class="comment-date" dir="ltr"><span
                                                            class='relativetime-clean'
                                                            title='2008-09-24 13:38:10Z, License: CC BY-SA 2.5'>Sep 24, 2008 at 13:38</span></span>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="comment js-comment " data-comment-id="24154981" data-comment-owner-id="857514"
                                            data-comment-score="1" id="comment-24154981">
                                            <div class="js-comment-actions comment-actions">
                                                <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">1</span>
                                                </div>
                                                <div class="comment-voting mtn2 js-comment-edit-hide">
                                                    <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                       role="button" tabindex="0"
                                                       title="This comment adds something useful to the post">
                                                        <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M1 12h16L9 4l-8 8Z"/>
                                                        </svg>
                                                    </a>
                                                </div>
                                                <div class="comment-flagging js-comment-edit-hide">
                                                    <button aria-label="Flag Comment"
                                                            aria-pressed="false"
                                                            class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                            title="Flag this comment for serious problems or moderator attention">
                                                        <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="comment-text  js-comment-text-and-form">
                                                <div class="comment-body js-comment-edit-hide">

                                                    <span class="comment-copy">This is a good starting point to understand what curry and partial application really is: <a
                                                            href="http://slid.es/gsklee/functional-programming-in-5-minutes"
                                                            rel="nofollow noreferrer">slid.es/gsklee/functional-programming-in-5-minutes</a></span>

                                                    <div class="d-inline-flex ai-center">
                                                        &ndash;&nbsp;<a class="comment-user"
                                                                        href="/users/857514/gsklee"
                                                                        title="4,814 reputation">gsklee</a>
                                                    </div>
                                                    <span class="comment-date" dir="ltr"><span
                                                            class='relativetime-clean'
                                                            title='2013-05-27 03:24:17Z, License: CC BY-SA 3.0'>May 27, 2013 at 3:24</span></span>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="comment js-comment " data-comment-id="32384530" data-comment-owner-id="1169389"
                                            data-comment-score="1" id="comment-32384530">
                                            <div class="js-comment-actions comment-actions">
                                                <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">1</span>
                                                </div>
                                                <div class="comment-voting mtn2 js-comment-edit-hide">
                                                    <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                       role="button" tabindex="0"
                                                       title="This comment adds something useful to the post">
                                                        <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M1 12h16L9 4l-8 8Z"/>
                                                        </svg>
                                                    </a>
                                                </div>
                                                <div class="comment-flagging js-comment-edit-hide">
                                                    <button aria-label="Flag Comment"
                                                            aria-pressed="false"
                                                            class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                            title="Flag this comment for serious problems or moderator attention">
                                                        <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="comment-text  js-comment-text-and-form">
                                                <div class="comment-body js-comment-edit-hide">

                                                    <span class="comment-copy">The link to <code>svendtofte.com</code> looks to be dead - found it on the WayBack machine though at <a
                                                            href="https://web.archive.org/web/20130616230053/http://www.svendtofte.com/code/curried_javascript/"
                                                            rel="nofollow noreferrer">web.archive.org/web/20130616230053/http://www.svendtofte.com/&hellip;</a> Sorry, <a
                                                            href="http://blog.morrisjohns.com/javascript_closures_for_dummies"
                                                            rel="nofollow noreferrer">blog.morrisjohns.com/javascript_closures_for_dummies</a> seems to be down too</span>

                                                    <div class="d-inline-flex ai-center">
                                                        &ndash;&nbsp;<a class="comment-user"
                                                                        href="/users/1169389/phatskat"
                                                                        title="1,797 reputation">phatskat</a>
                                                    </div>
                                                    <span class="comment-date" dir="ltr"><span
                                                            class='relativetime-clean'
                                                            title='2014-01-30 14:59:07Z, License: CC BY-SA 3.0'>Jan 30, 2014 at 14:59</span></span>
                                                    <span title="this comment was edited 1 time">
                            <svg aria-hidden="true" class="va-text-bottom o50 svg-icon iconPencilSm" height="14"
                                 viewBox="0 0 14 14" width="14"><path d="m2 10.12 6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z"
                                                                       fill="#F1B600"/><path
                                    d="m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0Z"
                                    fill="#E87C87"/></svg>
                        </span>
                                                </div>
                                            </div>
                                        </li>
                                        <li class="comment js-comment " data-comment-id="35195945" data-comment-owner-id="257182"
                                            data-comment-score="1" id="comment-35195945">
                                            <div class="js-comment-actions comment-actions">
                                                <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">1</span>
                                                </div>
                                                <div class="comment-voting mtn2 js-comment-edit-hide">
                                                    <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                       role="button" tabindex="0"
                                                       title="This comment adds something useful to the post">
                                                        <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M1 12h16L9 4l-8 8Z"/>
                                                        </svg>
                                                    </a>
                                                </div>
                                                <div class="comment-flagging js-comment-edit-hide">
                                                    <button aria-label="Flag Comment"
                                                            aria-pressed="false"
                                                            class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                            title="Flag this comment for serious problems or moderator attention">
                                                        <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                             viewBox="0 0 18 18" width="18">
                                                            <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                        </svg>
                                                    </button>
                                                </div>
                                            </div>
                                            <div class="comment-text  js-comment-text-and-form">
                                                <div class="comment-body js-comment-edit-hide">

                                                    <span class="comment-copy">BTW, Resig&#39;s version of partial is deficient (certainly not &quot;on the money&quot;) in that it will likely fail if one of the pre–initialised (&quot;curried&quot;) arguments is given the value <i>undefined</i>. Anyone interested in a good currying function should get the original from <a
                                                            href="http://osteele.com/sources/javascript/functional/"
                                                            rel="nofollow noreferrer">Oliver Steele&#39;s <i>funcitonal.js</i></a>, as it doesn&#39;t have that problem.</span>

                                                    <div class="d-inline-flex ai-center">
                                                        &ndash;&nbsp;<a class="comment-user"
                                                                        href="/users/257182/robg"
                                                                        title="145,107 reputation">RobG</a>
                                                    </div>
                                                    <span class="comment-date" dir="ltr"><span
                                                            class='relativetime-clean'
                                                            title='2014-04-12 22:59:08Z, License: CC BY-SA 3.0'>Apr 12, 2014 at 22:59</span></span>
                                                    <span title="this comment was edited 3 times">
                            <svg aria-hidden="true" class="va-text-bottom o50 svg-icon iconPencilSm" height="14"
                                 viewBox="0 0 14 14" width="14"><path d="m2 10.12 6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z"
                                                                       fill="#F1B600"/><path
                                    d="m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0Z"
                                    fill="#E87C87"/></svg>
                        </span>
                                                </div>
                                            </div>
                                        </li>

                                    </ul>
                                    <div class="comment-form">
                                        <form class=" "
                                              data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid answering questions in comments."
                                              data-textarea-id="comment-input-113780"
                                              id="add-comment-113780"></form>
                                    </div>
                                </div>

                                <div id="comments-link-113780">
                                    <a class="js-add-link comments-link"
                                       href=#
                                       href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.">Add a comment</a>
                                    <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                    <a class="js-show-link comments-link dno"
                                       href=# onclick="" role="button"
                                       title="Expand to show all comments on this post"></a>
                                </div>
                            </div>
                            <div class="post-layout--right">
                                <div style="margin-top:20px">
                                    <a class="bounty-link bounty js-gps-track"
                                       data-gps-track="post.click({ item: 3, priv: 27, post_type: 1 })"
                                       title="Offer some of your reputation for better answers">
                                        Start a bounty
                                    </a>
                                </div>
                            </div>
                        </div>

                    </div>


                    <div id="answers">
                        <a name="tab-top"></a>
                        <div id="answers-header">
                            <div class="answers-subheader d-flex ai-center mb8">
                                <div class="flex--item fl1">
                                    <h2 class="mb0" data-answercount="17">
                                        17 Answers
                                        <span itemprop="answerCount" style="display:none;">17</span>
                                    </h2>
                                </div>
                                <div class="flex--item">


                                    <div class="d-flex g4 gsx ai-center sm:fd-column sm:ai-start">
                                        <div class="d-flex fd-column ai-end sm:ai-start">
                                            <label class="flex--item fs-caption" for="answer-sort-dropdown-select-menu">
                                                Sorted by:
                                            </label>
                                            <a
                                                    class="js-sort-preference-change s-link flex--item fs-fine d-none"
                                                    data-value="ScoreDesc"
                                                    href="/questions/113780/javascript-curry-what-are-the-practical-applications?answertab=scoredesc#tab-top"
                                            >
                                                Reset to default
                                            </a>
                                        </div>
                                        <div class="flex--item s-select">
                                            <select id="answer-sort-dropdown-select-menu">
                                                <option
                                                        selected=selected
                                                        value=scoredesc
                                                >
                                                    Highest score (default)
                                                </option>
                                                <option
                                                        value=trending
                                                >
                                                    Trending (recent votes count more)
                                                </option>
                                                <option
                                                        value=modifieddesc
                                                >
                                                    Date modified (newest first)
                                                </option>
                                                <option
                                                        value=createdasc
                                                >
                                                    Date created (oldest first)
                                                </option>
                                            </select>
                                        </div>
                                    </div>


                                </div>
                            </div>

                        </div>


                        <a name="6861858"></a>
                        <div class="answer js-answer" data-answerid="6861858" data-highest-scored="1" data-parentid="113780"
                             data-position-on-page="1" data-question-has-accepted-highest-score="0" data-score="115"
                             id="answer-6861858" itemprop="acceptedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="6861858" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="115"
                                             itemprop="upvoteCount">
                                            115
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="6861858"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-6861858"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/6861858/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Here's an <a
                                                href="http://javascriptweblog.wordpress.com/2010/10/25/understanding-javascript-closures/"
                                                rel="noreferrer"><strong>interesting AND practical use of currying in
                                            JavaScript that uses closures</strong></a>:</p>

                                        <blockquote>
<pre><code>function converter(toUnit, factor, offset, input) {
    offset = offset || 0;
    return [((offset + input) * factor).toFixed(2), toUnit].join(" ");
}

var milesToKm = converter.curry('km', 1.60936, undefined);
var poundsToKg = converter.curry('kg', 0.45460, undefined);
var farenheitToCelsius = converter.curry('degrees C', 0.5556, -32);

milesToKm(10);            // returns "16.09 km"
poundsToKg(2.5);          // returns "1.14 kg"
farenheitToCelsius(98);   // returns "36.67 degrees C"
</code></pre>
                                        </blockquote>

                                        <p>This relies on a <code>curry</code> extension of <code>Function</code>,
                                            although as you can see it only uses <code>apply</code> (nothing too fancy):
                                        </p>

                                        <blockquote>
<pre><code>Function.prototype.curry = function() {
    if (arguments.length &lt; 1) {
        return this; //nothing to curry with - return function
    }
    var __method = this;
    var args = toArray(arguments);
    return function() {
        return __method.apply(this, args.concat([].slice.apply(null, arguments)));
    }
}
</code></pre>
                                        </blockquote>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2011-07-28T15:49:08" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="6861858"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/6861858/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/6861858/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-6861858" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/6861858/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2017-07-27 13:31:56Z'>Jul 27, 2017 at 13:31</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Jul 28, 2011 at 15:49. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/6861858/revisions" id="history-6861858"
                                                           title="show revision history for this post">
                                                            5 revs, 4 users 54%<br><a href="/users/312317">Prisoner
                                                            ZERO</a>
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount">10</span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12 "
                                         data-min-length="15"
                                         data-post-id="6861858" id="comments-6861858">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="5">

                                            <li class="comment js-comment " data-comment-id="8831647"
                                                data-comment-owner-id="198212" data-comment-score="5"
                                                id="comment-8831647">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="warm"
                          title="number of &#x27;useful comment&#x27; votes received">5</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">This is great! I see it similar to the lisp quote that says &quot;Lisp is a programmable programming language&quot;</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/198212/santiagobasulto"
                                                                            title="11,526 reputation">santiagobasulto</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2011-09-06 19:48:24Z, License: CC BY-SA 3.0'>Sep 6, 2011 at 19:48</span></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="9426689"
                                                data-comment-owner-id="4376" data-comment-score="2"
                                                id="comment-9426689">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">2</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">Interesting, but this example doesn&#39;t appear to work. <code>offset+input</code> will be <code>undefined + 1.60936</code> in your <code>milesToKm</code> example; that results in <code>NaN</code>.</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/4376/nathan-long"
                                                                            title="124,242 reputation">Nathan Long</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2011-10-12 19:35:43Z, License: CC BY-SA 3.0'>Oct 12, 2011 at 19:35</span></span>
                                                        <span title="this comment was edited 1 time">
                            <svg aria-hidden="true" class="va-text-bottom o50 svg-icon iconPencilSm" height="14"
                                 viewBox="0 0 14 14" width="14"><path d="m2 10.12 6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z"
                                                                       fill="#F1B600"/><path
                                    d="m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0Z"
                                    fill="#E87C87"/></svg>
                        </span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="9907861"
                                                data-comment-owner-id="615370" data-comment-score="3"
                                                id="comment-9907861">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">3</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">@Nathan - offset can&#39;t be undefined - it defaults to 0</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/615370/angusc"
                                                                            title="628 reputation">AngusC</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2011-11-10 17:44:18Z, License: CC BY-SA 3.0'>Nov 10, 2011 at 17:44</span></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="12196316"
                                                data-comment-owner-id="63369" data-comment-score="6"
                                                id="comment-12196316">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="warm"
                          title="number of &#x27;useful comment&#x27; votes received">6</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">From what I&#39;ve read (just now), &quot;curry&quot; is not normally part of a Function&#39;s bag of tricks, unless you are using the Prototype library or add it yourself.  Very cool, though.</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/63369/roboprog"
                                                                            title="3,104 reputation">Roboprog</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2012-03-08 03:06:27Z, License: CC BY-SA 3.0'>Mar 8, 2012 at 3:06</span></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="16891405"
                                                data-comment-owner-id="1181545" data-comment-score="11"
                                                id="comment-16891405">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="warm"
                          title="number of &#x27;useful comment&#x27; votes received">11</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">The same can be acheived with ES5 bind() method. Bind creates a new function that when called calls the original function with the context of its first argument and with the subsequent sequence of arguments (preceding any passed to the new function). So you can do... var milesToKm = converter.bind(this, &#39;km&#39;,1.60936); or var farenheitToCelsius = converter.bind(this, &#39;degrees C&#39;,0.5556, -32); The first argument, the context, this, is irrelevant here so you could just pass undefined. Of course you would need to augment the base Function prototype with your own bind method for non ES5 fallback</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/1181545/hacklikecrack"
                                                                            title="1,370 reputation">hacklikecrack</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2012-09-22 12:30:41Z, License: CC BY-SA 3.0'>Sep 22, 2012 at 12:30</span></span>
                                                        <span title="this comment was edited 1 time">
                            <svg aria-hidden="true" class="va-text-bottom o50 svg-icon iconPencilSm" height="14"
                                 viewBox="0 0 14 14" width="14"><path d="m2 10.12 6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z"
                                                                       fill="#F1B600"/><path
                                    d="m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0Z"
                                    fill="#E87C87"/></svg>
                        </span>
                                                    </div>
                                                </div>
                                            </li>

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-6861858"
                                                  id="add-comment-6861858"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-6861858">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator ">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link "
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post">Show <b>5</b> more comments</a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="114030"></a>
                        <div class="answer js-answer accepted-answer js-accepted-answer" data-answerid="114030"
                             data-highest-scored="0" data-parentid="113780" data-position-on-page="2" data-question-has-accepted-highest-score="0"
                             data-score="37" id="answer-114030"
                             itemprop="suggestedAnswer" itemscope itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="114030" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="37"
                                             itemprop="upvoteCount">
                                            37
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="114030"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-114030"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/114030/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>@Hank Gay</p>
                                        <p>In response to EmbiggensTheMind's comment:</p>
                                        <p>I can't think of an instance where <a
                                                href="http://en.wikipedia.org/wiki/Currying" rel="nofollow noreferrer">currying</a>—by
                                            itself—is useful in JavaScript; it is a technique for converting function
                                            calls with multiple arguments into chains of function calls with a single
                                            argument for each call, but JavaScript supports multiple arguments in a
                                            single function call.</p>
                                        <p>In JavaScript—and I assume most other actual languages (not lambda
                                            calculus)—it is commonly associated with partial application, though. John
                                            Resig <a
                                                    href="https://johnresig.com/blog/partial-functions-in-javascript/#postcomment"
                                                    rel="nofollow noreferrer">explains it better</a>, but the gist is
                                            that have some logic that will be applied to two or more arguments, and you
                                            only know the value(s) for some of those arguments.</p>
                                        <p>You can use partial application/currying to fix those known values and return
                                            a function that only accepts the unknowns, to be invoked later when you
                                            actually have the values you wish to pass. This provides a nifty way to
                                            avoid repeating yourself when you would have been calling the same
                                            JavaScript built-ins over and over with all the same values but one. To
                                            steal John's example:</p>
                                        <pre><code>String.prototype.csv = String.prototype.split.partial(/,\s*/);
var results = &quot;John, Resig, Boston&quot;.csv();
alert( (results[1] == &quot;Resig&quot;) + &quot; The text values were split properly&quot; );
</code></pre>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2008-09-22T09:47:20" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="114030"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 4.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/114030/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-suggest-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/114030/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-114030" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info user-hover ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/114030/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2023-08-02 01:28:07Z'>Aug 2, 2023 at 1:28</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/371/dave-anderson">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="Dave Anderson&#39;s user avatar"
                                                                    class="bar-sm" height="32"
                                                                    src="https://www.gravatar.com/avatar/e74e7299da165db42a5a461e150b82ff?s=64&amp;d=identicon&amp;r=PG" width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details">
                                                        <a href="/users/371/dave-anderson">Dave Anderson</a>
                                                        <div class="-flair">
                                                            <span class="reputation-score"
                                                                  dir="ltr"
                                                                  title="reputation score 12,046">12k</span><span aria-hidden="true"
                                                                                            title="3 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">3</span></span><span
                                                                class="v-visible-sr">3 gold badges</span><span
                                                                aria-hidden="true" title="58 silver badges"><span
                                                                class="badge2"></span><span class="badgecount">58</span></span><span
                                                                class="v-visible-sr">58 silver badges</span><span
                                                                aria-hidden="true" title="80 bronze badges"><span
                                                                class="badge3"></span><span class="badgecount">80</span></span><span
                                                                class="v-visible-sr">80 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info user-hover ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <span class='relativetime'
                                                                           title='2008-09-22 09:47:20Z'>Sep 22, 2008 at 9:47</span>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/4203/hank-gay">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="Hank Gay&#39;s user avatar"
                                                                    class="bar-sm" height="32"
                                                                    src="https://www.gravatar.com/avatar/646c35309b1b074fba9cf2e6a482ac3b?s=64&amp;d=identicon&amp;r=PG" width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details" itemprop="author" itemscope
                                                         itemtype="http://schema.org/Person">
                                                        <a href="/users/4203/hank-gay">Hank Gay</a><span class="d-none"
                                                                                                         itemprop="name">Hank Gay</span>
                                                        <div class="-flair">
                                                            <span class="reputation-score"
                                                                  dir="ltr" title="reputation score 71,065">71.1k</span><span
                                                                aria-hidden="true" title="36 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">36</span></span><span
                                                                class="v-visible-sr">36 gold badges</span><span
                                                                aria-hidden="true" title="160 silver badges"><span
                                                                class="badge2"></span><span
                                                                class="badgecount">160</span></span><span
                                                                class="v-visible-sr">160 silver badges</span><span
                                                                aria-hidden="true" title="222 bronze badges"><span
                                                                class="badge3"></span><span
                                                                class="badgecount">222</span></span><span
                                                                class="v-visible-sr">222 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>


                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount">3</span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12 "
                                         data-min-length="15"
                                         data-post-id="114030" id="comments-114030">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                            <li class="comment js-comment " data-comment-id="63486476"
                                                data-comment-owner-id="-1" data-comment-score="7"
                                                id="comment-63486476">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="warm"
                          title="number of &#x27;useful comment&#x27; votes received">7</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">This is really a bad answer. Currying has nothing to do with partial application. Currying enables function composition. Function composition enables function reuse. Reuse of functions increases code maintainability. It&#39;s that easy!</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<span class="comment-user">user6445533</span>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2016-06-24 21:31:56Z, License: CC BY-SA 3.0'>Jun 24, 2016 at 21:31</span></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="89832702"
                                                data-comment-owner-id="4986641" data-comment-score="3"
                                                id="comment-89832702">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">3</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">@ftor sir, you are a very bad answer. Currying is obviously about making functions more tasty. You clearly missed the point.</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/4986641/callat"
                                                                            title="2,976 reputation">Callat</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2018-07-19 20:03:16Z, License: CC BY-SA 4.0'>Jul 19, 2018 at 20:03</span></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="121301712"
                                                data-comment-owner-id="5671836" data-comment-score="0"
                                                id="comment-121301712">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">oftentimes it is said that currying is useful for function composition, but I can write a compose function without requiring currying if all my composed functions take one argument. Currying is needed when one or more of the functions take more than one argument.</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/5671836/aestheticsdata"
                                                                            title="617 reputation">aestheticsData</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2021-08-03 14:12:53Z, License: CC BY-SA 4.0'>Aug 3, 2021 at 14:12</span></span>
                                                    </div>
                                                </div>
                                            </li>

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-114030"
                                                  id="add-comment-114030"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-114030">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="32379766"></a>
                        <div class="answer js-answer" data-answerid="32379766" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="3" data-question-has-accepted-highest-score="0" data-score="14"
                             id="answer-32379766" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="32379766" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="14"
                                             itemprop="upvoteCount">
                                            14
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="32379766"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-32379766"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/32379766/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Agreeing with Hank Gay - It's extremely useful in certain true functional
                                            programming languages - because it's a necessary part. For example, in
                                            Haskell you simply cannot take multiple parameters to a function - you
                                            cannot do that in pure functional programming. You take one param at a time
                                            and build up your function. In JavaScript it's simply unnecessary, despite
                                            contrived examples like "converter". Here's that same converter code,
                                            without the need for currying:</p>

                                        <pre><code>var converter = function(ratio, symbol, input) {
    return (input*ratio).toFixed(2) + " " + symbol;
}

var kilosToPoundsRatio = 2.2;
var litersToUKPintsRatio = 1.75;
var litersToUSPintsRatio = 1.98;
var milesToKilometersRatio = 1.62;

converter(kilosToPoundsRatio, "lbs", 4); //8.80 lbs
converter(litersToUKPintsRatio, "imperial pints", 2.4); //4.20 imperial pints
converter(litersToUSPintsRatio, "US pints", 2.4); //4.75 US pints
converter(milesToKilometersRatio, "km", 34); //55.08 km
</code></pre>

                                        <p>I badly wish Douglas Crockford, in "JavaScript: The Good Parts", had given
                                            some mention of the history and actual use of currying rather than his
                                            offhanded remarks. For the longest time after reading that, I was boggled,
                                            until I was studying Functional programming and realized that's where it
                                            came from.</p>

                                        <p>After some more thinking, I posit there is one valid use case for currying in
                                            JavaScript: if you are trying to write using pure functional programming
                                            techniques using JavaScript. Seems like a rare use case though.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2015-09-03T15:25:47" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="32379766"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/32379766/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/32379766/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-delete-post s-btn s-btn__link js-gps-track "
                                                                    data-fancy-delete="false"
                                                                    data-gps-track="post.click({ item: 8, priv: 27, post_type: 2 })"
                                                                    data-has-active-vote="false"
                                                                    data-has-deleted-vote="false"
                                                                    data-is-deleted="false"
                                                                    data-prompt="Delete this post?"
                                                                    href="#"
                                                                    title="Vote to delete this post"
                                                                    type="button">
                                                                Delete
                                                            </button>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/32379766/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2015-09-14 14:19:08Z'>Sep 14, 2015 at 14:19</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Sep 3, 2015 at 15:25. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/32379766/revisions" id="history-32379766"
                                                           title="show revision history for this post">
                                                            3 revs<br><a href="/users/713809">Byron Katz</a>
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount">1</span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12 "
                                         data-min-length="15"
                                         data-post-id="32379766" id="comments-32379766">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                            <li class="comment js-comment " data-comment-id="77071009"
                                                data-comment-owner-id="7238242" data-comment-score="4"
                                                id="comment-77071009">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">4</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <div aria-label="You&#x27;ve voted for this as a useful comment"
                                                             class="comment-up-on ba bc-transparent"
                                                             title="You&#x27;ve voted for this as a useful comment">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </div>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">Your code is much easier to understand than Prisoner Zero&#39;s and it solves the same problem without currying or anything complex.  You&#39;ve got 2 thumbs up and he has almost 100.  Go figure.</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/7238242/dr01d"
                                                                            title="1,355 reputation">DR01D</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2017-07-12 04:47:58Z, License: CC BY-SA 3.0'>Jul 12, 2017 at 4:47</span></span>
                                                    </div>
                                                </div>
                                            </li>

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting."
                                                  data-textarea-id="comment-input-32379766"
                                                  id="add-comment-32379766"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-32379766">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to reply to other users or notify them of changes. If you are adding new information, edit your post instead of commenting.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="113857"></a>
                        <div class="answer js-answer" data-answerid="113857" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="4" data-question-has-accepted-highest-score="0" data-score="7"
                             id="answer-113857" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="113857" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="7"
                                             itemprop="upvoteCount">
                                            7
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="113857"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-113857"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/113857/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>I found functions that resemble python's <code>functools.partial</code> more
                                            useful in JavaScript:</p>

                                        <pre><code>function partial(fn) {
  return partialWithScope.apply(this,
    Array.prototype.concat.apply([fn, this],
      Array.prototype.slice.call(arguments, 1)));
}

function partialWithScope(fn, scope) {
  var args = Array.prototype.slice.call(arguments, 2);
  return function() {
    return fn.apply(scope, Array.prototype.concat.apply(args, arguments));
  };
}
</code></pre>

                                        <p>Why would you want to use it? A common situation where you want to use this
                                            is when you want to bind <code>this</code> in a function to a value:</p>

                                        <pre><code>var callback = partialWithScope(Object.function, obj);
</code></pre>

                                        <p>Now when callback is called, <code>this</code> points to <code>obj</code>.
                                            This is useful in event situations or to save some space because it usually
                                            makes code shorter.</p>

                                        <p>Currying is similar to partial with the difference that the function the
                                            currying returns just accepts one argument (as far as I understand
                                            that).</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2008-09-22T08:49:04" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="113857"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 2.5"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f2.5%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/113857/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-suggest-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/113857/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-113857" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <span class='relativetime'
                                                                           title='2008-09-22 08:49:04Z'>Sep 22, 2008 at 8:49</span>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/19990/armin-ronacher">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="Armin Ronacher&#39;s user avatar"
                                                                    class="bar-sm" height="32"
                                                                    src="https://www.gravatar.com/avatar/181de1fb11dffe39774f3e2e23cda3b6?s=64&amp;d=identicon&amp;r=PG" width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details" itemprop="author" itemscope
                                                         itemtype="http://schema.org/Person">
                                                        <a href="/users/19990/armin-ronacher">Armin Ronacher</a><span
                                                            class="d-none" itemprop="name">Armin Ronacher</span>
                                                        <div class="-flair">
                                                            <span class="reputation-score"
                                                                  dir="ltr" title="reputation score 32,194">32.2k</span><span
                                                                aria-hidden="true" title="13 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">13</span></span><span
                                                                class="v-visible-sr">13 gold badges</span><span
                                                                aria-hidden="true" title="66 silver badges"><span
                                                                class="badge2"></span><span class="badgecount">66</span></span><span
                                                                class="v-visible-sr">66 silver badges</span><span
                                                                aria-hidden="true" title="69 bronze badges"><span
                                                                class="badge3"></span><span class="badgecount">69</span></span><span
                                                                class="v-visible-sr">69 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>


                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="113857" id="comments-113857">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-113857"
                                                  id="add-comment-113857"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-113857">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="68580704"></a>
                        <div class="answer js-answer" data-answerid="68580704" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="5" data-question-has-accepted-highest-score="0" data-score="5"
                             id="answer-68580704" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="68580704" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="5"
                                             itemprop="upvoteCount">
                                            5
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="68580704"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-68580704"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/68580704/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Consider <code>filter</code> function. And you want to write a callback for
                                            it.</p>
                                        <pre><code>let x = [1,2,3,4,5,6,7,11,12,14,15];
let results = x.filter(callback);
</code></pre>
                                        <p>Assume want to output only even numbers, so:</p>
                                        <pre><code>let callback = x =&gt; x % 2 === 0;
</code></pre>
                                        <p>Now imagine we want to implement our <code>callback</code> such that
                                            depending on scenario it outputs even numbers which are above some <strong>threshold
                                                number</strong> (such
                                            number should be configurable).</p>
                                        <p>We can't easily make such threshold number a parameter to
                                            <code>callback</code> function, because <code>filter</code> invokes <code>callback</code>
                                            and by default passes it array elements and index.</p>
                                        <p>How would you implement this?</p>
                                        <p>This is a good use case for currying:</p>
                                        <p>
                                        <div class="snippet" data-babel="false" data-console="true" data-hide="false"
                                             data-lang="js">
                                            <div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>let x = [1,2,3,4,5,6,7,11,12,14,15];
let callback = (threshold) =&gt; (x) =&gt; (x % 2==0 &amp;&amp; x &gt; threshold);

let results1 = x.filter(callback(5)); // Even numbers higher than 5
let results2 = x.filter(callback(10)); // Even numbers higher than 10

console.log(results1,results2);</code></pre>
                                            </div>
                                        </div>
                                        </p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2021-07-29T17:47:35" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="68580704"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 4.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/68580704/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/68580704/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-68580704" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/68580704/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2021-07-29 17:47:35Z'>Jul 29, 2021 at 17:47</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Jul 29, 2021 at 17:47. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/68580704/revisions" id="history-68580704"
                                                           title="show revision history for this post">
                                                            Giorgi Moniava
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount">0</span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="68580704" id="comments-68580704">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-68580704"
                                                  id="add-comment-68580704"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-68580704">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="31560758"></a>
                        <div class="answer js-answer" data-answerid="31560758" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="6" data-question-has-accepted-highest-score="0" data-score="2"
                             id="answer-31560758" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="31560758" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="2"
                                             itemprop="upvoteCount">
                                            2
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="31560758"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-31560758"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/31560758/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>I know its old thread but I will have to show how this is being used in
                                            javascript libraries:</p>

                                        <p>I will use lodash.js library to describe these concepts concretely.</p>

                                        <p>Example:</p>

                                        <pre><code>var fn = function(a,b,c){
return a+b+c+(this.greet || ‘');
}
</code></pre>

                                        <p>Partial Application:</p>

                                        <pre><code>var partialFnA = _.partial(fn, 1,3);
</code></pre>

                                        <p>Currying: </p>

                                        <pre><code>var curriedFn = _.curry(fn);
</code></pre>

                                        <p>Binding: </p>

                                        <pre><code>var boundFn = _.bind(fn,object,1,3 );//object= {greet: ’!'}
</code></pre>

                                        <p>usage:</p>

                                        <pre><code>curriedFn(1)(3)(5); // gives 9
or
curriedFn(1,3)(5); // gives 9
or
curriedFn(1)(_,3)(2); //gives 9


partialFnA(5); //gives 9

boundFn(5); //gives 9!
</code></pre>

                                        <p>difference:</p>

                                        <p>after currying we get a new function with no parameters pre bound.</p>

                                        <p>after partial application we get a function which is bound with some
                                            parameters prebound.</p>

                                        <p>in binding we can bind a context which will be used to replace ‘this’, if not
                                            bound default of any function will be window scope.</p>

                                        <p>Advise: There is no need to reinvent the wheel. Partial
                                            application/binding/currying are very much related. You can see the
                                            difference above. Use this meaning anywhere and people will recognise what
                                            you are doing without issues in understanding plus you will have to use less
                                            code.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2015-07-22T10:39:46" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="31560758"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/31560758/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/31560758/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-31560758" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/31560758/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2015-12-18 20:32:29Z'>Dec 18, 2015 at 20:32</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Jul 22, 2015 at 10:39. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/31560758/revisions" id="history-31560758"
                                                           title="show revision history for this post">
                                                            2 revs<br><a href="/users/3221274">Shishir Arora</a>
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="31560758" id="comments-31560758">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-31560758"
                                                  id="add-comment-31560758"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-31560758">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="113847"></a>
                        <div class="answer js-answer" data-answerid="113847" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="7" data-question-has-accepted-highest-score="0" data-score="2"
                             id="answer-113847" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="113847" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="2"
                                             itemprop="upvoteCount">
                                            2
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="113847"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-113847"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/113847/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>It's no magic or anything... just a pleasant shorthand for anonymous
                                            functions.</p>

                                        <p><code>partial(alert, "FOO!")</code> is equivalent to <code>function(){alert("FOO!");}</code>
                                        </p>

                                        <p><code>partial(Math.max, 0)</code> corresponds to <code>function(x){return
                                            Math.max(0, x);}</code></p>

                                        <p>The calls to partial (<a href="http://mochikit.com"
                                                                    rel="nofollow noreferrer">MochiKit</a> terminology.
                                            I think some other libraries give functions a .curry method which does the
                                            same thing) look slightly nicer and less noisy than the anonymous functions.
                                        </p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2008-09-22T08:46:53" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="113847"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 4.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/113847/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-suggest-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/113847/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-113847" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info user-hover ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/113847/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2018-08-09 14:33:01Z'>Aug 9, 2018 at 14:33</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/542251/liam">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="Liam&#39;s user avatar"
                                                                    class="bar-sm" height="32" src="https://i.stack.imgur.com/E28Ov.png?s=64&amp;g=1"
                                                                    width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details">
                                                        <a href="/users/542251/liam">Liam</a>
                                                        <div class="-flair">
                                                            <span class="reputation-score"
                                                                  dir="ltr" title="reputation score 28,549">28.5k</span><span
                                                                aria-hidden="true" title="28 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">28</span></span><span
                                                                class="v-visible-sr">28 gold badges</span><span
                                                                aria-hidden="true" title="132 silver badges"><span
                                                                class="badge2"></span><span
                                                                class="badgecount">132</span></span><span
                                                                class="v-visible-sr">132 silver badges</span><span
                                                                aria-hidden="true" title="194 bronze badges"><span
                                                                class="badge3"></span><span
                                                                class="badgecount">194</span></span><span
                                                                class="v-visible-sr">194 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <span class='relativetime'
                                                                           title='2008-09-22 08:46:53Z'>Sep 22, 2008 at 8:46</span>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/12038/marijn">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="Marijn&#39;s user avatar"
                                                                    class="bar-sm" height="32"
                                                                    src="https://www.gravatar.com/avatar/ac4e67cfc9ebe96b4c6964df6c48ad69?s=64&amp;d=identicon&amp;r=PG" width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details" itemprop="author" itemscope
                                                         itemtype="http://schema.org/Person">
                                                        <a href="/users/12038/marijn">Marijn</a><span class="d-none"
                                                                                                      itemprop="name">Marijn</span>
                                                        <div class="-flair">
                                                            <span class="reputation-score" dir="ltr"
                                                                  title="reputation score ">2,076</span><span aria-hidden="true"
                                                                                              title="2 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">2</span></span><span
                                                                class="v-visible-sr">2 gold badges</span><span
                                                                aria-hidden="true" title="13 silver badges"><span
                                                                class="badge2"></span><span class="badgecount">13</span></span><span
                                                                class="v-visible-sr">13 silver badges</span><span
                                                                aria-hidden="true" title="11 bronze badges"><span
                                                                class="badge3"></span><span class="badgecount">11</span></span><span
                                                                class="v-visible-sr">11 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>


                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="113847" id="comments-113847">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-113847"
                                                  id="add-comment-113847"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-113847">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="5370631"></a>
                        <div class="answer js-answer" data-answerid="5370631" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="8" data-question-has-accepted-highest-score="0" data-score="1"
                             id="answer-5370631" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="5370631" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="1"
                                             itemprop="upvoteCount">
                                            1
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="5370631"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-5370631"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/5370631/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>JavaScript functions is called lamda in other functional language. It can be
                                            used to compose a new api (more powerful or complext function) to based on
                                            another developer's simple input. Curry is just one of the techniques. You
                                            can use it to create a simplified api to call a complex api. If you are the
                                            develper who use the simplified api (for example you use jQuery to do simple
                                            manipulation), you don't need to use curry. But if you want to create the
                                            simplified api, curry is your friend. You have to write a javascript
                                            framework (like jQuery, mootools) or library, then you can appreciate its
                                            power. I wrote a enhanced curry function, at <a
                                                    href="http://blog.semanticsworks.com/2011/03/enhanced-curry-method.html"
                                                    rel="nofollow">http://blog.semanticsworks.com/2011/03/enhanced-curry-method.html</a>
                                            . You don't need to the curry method to do currying, it just help to do
                                            currying, but you can always do it manually by writing a function A(){} to
                                            return another function B(){}. To make it more interesting, use function B()
                                            to return another function C().</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2011-03-20T18:52:10" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="5370631"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/5370631/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/5370631/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-5370631" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/5370631/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2011-11-15 23:12:17Z'>Nov 15, 2011 at 23:12</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Mar 20, 2011 at 18:52. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/5370631/revisions" id="history-5370631"
                                                           title="show revision history for this post">
                                                            2 revs, 2 users 67%<br><a href="/users/282756">Fred Yang</a>

                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="5370631" id="comments-5370631">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-5370631"
                                                  id="add-comment-5370631"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-5370631">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="113799"></a>
                        <div class="answer js-answer" data-answerid="113799" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="9" data-question-has-accepted-highest-score="0" data-score="1"
                             id="answer-113799" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="113799" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="1"
                                             itemprop="upvoteCount">
                                            1
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="113799"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-113799"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/113799/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>I would say that, most probably, all the animation library in JS are using
                                            currying. Rather than having to pass for each call a set of impacted
                                            elements and a function, describing how the element should behave, to a
                                            higher order function that will ensure all the timing stuff, its generally
                                            easier for the customer to release, as public API some function like
                                            "slideUp", "fadeIn" that takes only elements as arguments, and that are just
                                            some curried function returning the high order function with the default
                                            "animation function" built-in.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2008-09-22T08:27:38" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="113799"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 2.5"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f2.5%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/113799/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-suggest-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/113799/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-113799" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <span class='relativetime'
                                                                           title='2008-09-22 08:27:38Z'>Sep 22, 2008 at 8:27</span>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/9396/gizmo">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="gizmo&#39;s user avatar"
                                                                    class="bar-sm" height="32" src="https://www.gravatar.com/avatar/19e330b6939c54c1e861e66cfcb98fda?s=64&amp;d=identicon&amp;r=PG"
                                                                    width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details" itemprop="author" itemscope
                                                         itemtype="http://schema.org/Person">
                                                        <a href="/users/9396/gizmo">gizmo</a><span class="d-none"
                                                                                                   itemprop="name">gizmo</span>
                                                        <div class="-flair">
                                                            <span class="reputation-score"
                                                                  dir="ltr" title="reputation score 11,879">11.9k</span><span
                                                                aria-hidden="true" title="6 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">6</span></span><span
                                                                class="v-visible-sr">6 gold badges</span><span
                                                                aria-hidden="true" title="45 silver badges"><span
                                                                class="badge2"></span><span class="badgecount">45</span></span><span
                                                                class="v-visible-sr">45 silver badges</span><span
                                                                aria-hidden="true" title="62 bronze badges"><span
                                                                class="badge3"></span><span class="badgecount">62</span></span><span
                                                                class="v-visible-sr">62 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>


                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount">2</span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12 "
                                         data-min-length="15"
                                         data-post-id="113799" id="comments-113799">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                            <li class="comment js-comment " data-comment-id="23048" data-comment-owner-id="9474"
                                                data-comment-score="0" id="comment-23048">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">Why is it better to curry the higherup function rather than simply call it with some defaults?</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user owner"
                                                                            href="/users/9474/dave-nolan"
                                                                            title="3,009 reputation">Dave Nolan</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2008-09-22 08:39:23Z, License: CC BY-SA 2.5'>Sep 22, 2008 at 8:39</span></span>
                                                    </div>
                                                </div>
                                            </li>
                                            <li class="comment js-comment " data-comment-id="23232" data-comment-owner-id="9396"
                                                data-comment-score="1" id="comment-23232">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                    <span class="cool"
                          title="number of &#x27;useful comment&#x27; votes received">1</span>
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">Because it&#39;s highly more modular to be able to curry a &quot;doMathOperation&quot; with an addition/multiplication/square/modulus/other-calucation at wish than to imagine all the &quot;default&quot; that the higher function could support.</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user"
                                                                            href="/users/9396/gizmo"
                                                                            title="11,879 reputation">gizmo</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2008-09-22 10:52:36Z, License: CC BY-SA 2.5'>Sep 22, 2008 at 10:52</span></span>
                                                    </div>
                                                </div>
                                            </li>

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-113799"
                                                  id="add-comment-113799"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-113799">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="113790"></a>
                        <div class="answer js-answer" data-answerid="113790" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="10" data-question-has-accepted-highest-score="0" data-score="1"
                             id="answer-113790" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="113790" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="1"
                                             itemprop="upvoteCount">
                                            1
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="113790"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-113790"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/113790/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>As for libraries using it, there's always <a
                                                href="http://osteele.com/sources/javascript/functional/"
                                                rel="nofollow noreferrer">Functional</a>.</p>

                                        <p>When is it useful in JS? Probably the same times it is useful in other modern
                                            languages, but the only time I can see myself using it is in conjunction
                                            with partial application.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2008-09-22T08:26:22" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="113790"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 2.5"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f2.5%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/113790/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-suggest-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/113790/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-113790" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info user-hover ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <span class='relativetime'
                                                                           title='2008-09-22 08:26:22Z'>Sep 22, 2008 at 8:26</span>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">
                                                        <a href="/users/4203/hank-gay">
                                                            <div class="gravatar-wrapper-32"><img
                                                                    alt="Hank Gay&#39;s user avatar"
                                                                    class="bar-sm" height="32"
                                                                    src="https://www.gravatar.com/avatar/646c35309b1b074fba9cf2e6a482ac3b?s=64&amp;d=identicon&amp;r=PG" width="32"></div>
                                                        </a>
                                                    </div>
                                                    <div class="user-details" itemprop="author" itemscope
                                                         itemtype="http://schema.org/Person">
                                                        <a href="/users/4203/hank-gay">Hank Gay</a><span class="d-none"
                                                                                                         itemprop="name">Hank Gay</span>
                                                        <div class="-flair">
                                                            <span class="reputation-score"
                                                                  dir="ltr" title="reputation score 71,065">71.1k</span><span
                                                                aria-hidden="true" title="36 gold badges"><span
                                                                class="badge1"></span><span class="badgecount">36</span></span><span
                                                                class="v-visible-sr">36 gold badges</span><span
                                                                aria-hidden="true" title="160 silver badges"><span
                                                                class="badge2"></span><span
                                                                class="badgecount">160</span></span><span
                                                                class="v-visible-sr">160 silver badges</span><span
                                                                aria-hidden="true" title="222 bronze badges"><span
                                                                class="badge3"></span><span
                                                                class="badgecount">222</span></span><span
                                                                class="v-visible-sr">222 bronze badges</span>
                                                        </div>
                                                    </div>
                                                </div>


                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount">1</span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12 "
                                         data-min-length="15"
                                         data-post-id="113790" id="comments-113790">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                            <li class="comment js-comment " data-comment-id="23104" data-comment-owner-id="9474"
                                                data-comment-score="0" id="comment-23104">
                                                <div class="js-comment-actions comment-actions">
                                                    <div class="comment-score js-comment-score js-comment-edit-hide">
                                                    </div>
                                                    <div class="comment-voting mtn2 js-comment-edit-hide">
                                                        <a aria-label="Upvote Comment" class="js-comment-up comment-up-off" href="#"
                                                           role="button"
                                                           tabindex="0"
                                                           title="This comment adds something useful to the post">
                                                            <svg aria-hidden="true" class="svg-icon iconArrowUp"
                                                                 height="18" viewBox="0 0 18 18" width="18">
                                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                                            </svg>
                                                        </a>
                                                    </div>
                                                    <div class="comment-flagging js-comment-edit-hide">
                                                        <button aria-label="Flag Comment"
                                                                aria-pressed="false"
                                                                class="js-comment-flag s-btn s-btn__unset bg-transparent c-pointer fc-black-350 o40 h:fc-red-400 h:o100"
                                                                title="Flag this comment for serious problems or moderator attention">
                                                            <svg aria-hidden="true" class="svg-icon iconFlag" height="18"
                                                                 viewBox="0 0 18 18" width="18">
                                                                <path d="M3 2v14h2v-6h3.6l.4 1h6V3H9.5L9 2H3Z"/>
                                                            </svg>
                                                        </button>
                                                    </div>
                                                </div>
                                                <div class="comment-text  js-comment-text-and-form">
                                                    <div class="comment-body js-comment-edit-hide">

                                                        <span class="comment-copy">Thanks Hank - please can you expand on when it is useful in general?</span>

                                                        <div class="d-inline-flex ai-center">
                                                            &ndash;&nbsp;<a class="comment-user owner"
                                                                            href="/users/9474/dave-nolan"
                                                                            title="3,009 reputation">Dave Nolan</a>
                                                        </div>
                                                        <span class="comment-date" dir="ltr"><span
                                                                class='relativetime-clean'
                                                                title='2008-09-22 09:17:32Z, License: CC BY-SA 2.5'>Sep 22, 2008 at 9:17</span></span>
                                                    </div>
                                                </div>
                                            </li>

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-113790"
                                                  id="add-comment-113790"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-113790">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="3322715"></a>
                        <div class="answer js-answer" data-answerid="3322715" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="11" data-question-has-accepted-highest-score="0" data-score="1"
                             id="answer-3322715" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="3322715" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="1"
                                             itemprop="upvoteCount">
                                            1
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="3322715"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-3322715"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/3322715/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Here's an example.</p>

                                        <p>I'm instrumenting a bunch of fields with JQuery so I can see what users are
                                            up to. The code looks like this:</p>

                                        <pre><code>$('#foo').focus(trackActivity);
$('#foo').blur(trackActivity);
$('#bar').focus(trackActivity);
$('#bar').blur(trackActivity);
</code></pre>

                                        <p>(For non-JQuery users, I'm saying that any time a couple of fields get or
                                            lose focus, I want the trackActivity() function to be called. I could also
                                            use an anonymous function, but I'd have to duplicate it 4 times, so I pulled
                                            it out and named it.)</p>

                                        <p>Now it turns out that one of those fields needs to be handled differently.
                                            I'd like to be able to pass a parameter in on one of those calls to be
                                            passed along to our tracking infrastructure. With currying, I can.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2010-07-23T22:01:54" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="3322715"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 2.5"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f2.5%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/3322715/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/3322715/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-3322715" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/3322715/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2010-07-23 22:01:54Z'>Jul 23, 2010 at 22:01</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Jul 23, 2010 at 22:01. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/3322715/revisions" id="history-3322715"
                                                           title="show revision history for this post">
                                                            William Pietri
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="3322715" id="comments-3322715">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-3322715"
                                                  id="add-comment-3322715"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-3322715">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="32116810"></a>
                        <div class="answer js-answer" data-answerid="32116810" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="12" data-question-has-accepted-highest-score="0" data-score="0"
                             id="answer-32116810" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="32116810" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="0"
                                             itemprop="upvoteCount">
                                            0
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="32116810"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-32116810"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/32116810/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>You can use native bind for quick, one line solution</p>

                                        <p>
                                        <div class="snippet" data-hide="false" data-lang="js">
                                            <div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>function clampAngle(min, max, angle) {
    var result, delta;
    delta = max - min;
    result = (angle - min) % delta;
    if (result &lt; 0) {
        result += delta;
    }
    return min + result;
};

var clamp0To360 = clampAngle.bind(null, 0, 360);

console.log(clamp0To360(405)) // 45</code></pre>
                                            </div>
                                        </div>
                                        </p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2015-08-20T11:17:03" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="32116810"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/32116810/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/32116810/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-32116810" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/32116810/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2015-08-20 11:17:03Z'>Aug 20, 2015 at 11:17</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Aug 20, 2015 at 11:17. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/32116810/revisions" id="history-32116810"
                                                           title="show revision history for this post">
                                                            cstuncsik
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="32116810" id="comments-32116810">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-32116810"
                                                  id="add-comment-32116810"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-32116810">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="36505248"></a>
                        <div class="answer js-answer" data-answerid="36505248" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="13" data-question-has-accepted-highest-score="0" data-score="0"
                             id="answer-36505248" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="36505248" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="0"
                                             itemprop="upvoteCount">
                                            0
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="36505248"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-36505248"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/36505248/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Another stab at it, from working with promises.</p>

                                        <p><em>(Disclaimer: JS noob, coming from the Python world. Even there, <strong>currying</strong>
                                            is not used all that much, but it can come in handy on occasion. So I
                                            cribbed the currying function - see links)</em></p>

                                        <p>First, I am starting with an ajax call. I have some specific processing to do
                                            on success, but on failure, I just want to give the user the feedback that
                                            calling <em>something</em> resulted in <em>some error</em>. In my actual
                                            code, I display the error feedback in a bootstrap panel, but am just using
                                            logging here.</p>

                                        <p>I've modified my live url to make this fail.</p>

                                        <pre><code>function ajax_batch(e){
    var url = $(e.target).data("url");

    //induce error
    url = "x" + url;

    var promise_details = $.ajax(
        url,
        {
            headers: { Accept : "application/json" },
            // accepts : "application/json",
            beforeSend: function (request) {
                if (!this.crossDomain) {
                    request.setRequestHeader("X-CSRFToken", csrf_token);
                }
        },
        dataType : "json",
        type : "POST"}
    );
    promise_details.then(notify_batch_success, fail_status_specific_to_batch);
}
</code></pre>

                                        <p>Now, here in order to tell the user that a batch failed, I need to write that
                                            info in the error handler, because all it is getting is a response from the
                                            server.</p>

                                        <p>I still only have the info available at coding time - in my case I have a
                                            number of possible batches, but I don't know which one has failed w.o.
                                            parsing the server response about the failed url.</p>

                                        <pre><code>function fail_status_specific_to_batch(d){
    console.log("bad batch run, dude");
    console.log("response.status:" + d.status);
}
</code></pre>

                                        <p>Let's do it. Console output is:</p>

                                        <p>console:</p>

                                        <p><code>bad batch run, dude
                                            utility.js (line 109)
                                            response.status:404</code></p>

                                        <p>Now, let's change things a bit and use a reusable generic failure handler,
                                            but also one that is <em>curried</em> at runtime with both the
                                            known-at-code-time calling context and the run-time info available from
                                            event.</p>

                                        <pre><code>    ... rest is as before...
    var target = $(e.target).text();
    var context = {"user_msg": "bad batch run, dude.  you were calling :" + target};
    var contexted_fail_notification = curry(generic_fail, context);

    promise_details.then(notify_batch_success, contexted_fail_notification);
}

function generic_fail(context, d){
    console.log(context);
    console.log("response.status:" + d.status);
}

function curry(fn) {
     var slice = Array.prototype.slice,
        stored_args = slice.call(arguments, 1);
     return function () {
        var new_args = slice.call(arguments),
              args = stored_args.concat(new_args);
        return fn.apply(null, args);
     };
}
</code></pre>

                                        <p>console:</p>

                                        <p><code>Object { user_msg="bad batch run, dude. you were calling :Run ACL now"}
                                            utility.js (line 117)
                                            response.status:404
                                            utility.js (line 118)</code></p>

                                        <p>More generally, given how widespread callback usage is in JS, currying seems
                                            like a quite useful tool to have.</p>

                                        <p>
                                            <a href="https://javascriptweblog.wordpress.com/2010/04/05/curry-cooking-up-tastier-functions/"
                                               rel="nofollow">https://javascriptweblog.wordpress.com/2010/04/05/curry-cooking-up-tastier-functions/</a>
                                            <a href="http://www.drdobbs.com/open-source/currying-and-partial-functions-in-javasc/231001821?pgno=2"
                                               rel="nofollow">http://www.drdobbs.com/open-source/currying-and-partial-functions-in-javasc/231001821?pgno=2</a>
                                        </p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2016-04-08T16:56:47" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="36505248"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/36505248/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/36505248/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-36505248" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            <a class="js-gps-track"
                                                               data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                               href="/posts/36505248/revisions"
                                                               title="show all edits to this post">edited
                                                                <span class='relativetime' title='2016-04-11 17:11:56Z'>Apr 11, 2016 at 17:11</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Apr 8, 2016 at 16:56. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/36505248/revisions" id="history-36505248"
                                                           title="show revision history for this post">
                                                            3 revs<br><a href="/users/1394353">JL Peyret</a>
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="36505248" id="comments-36505248">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-36505248"
                                                  id="add-comment-36505248"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-36505248">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="4923899"></a>
                        <div class="answer js-answer" data-answerid="4923899" data-highest-scored="0" data-parentid="113780"
                             data-position-on-page="14" data-question-has-accepted-highest-score="0" data-score="0"
                             id="answer-4923899" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="4923899" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="0"
                                             itemprop="upvoteCount">
                                            0
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="4923899"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-4923899"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/4923899/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>I agree that at times you would like to get the ball rolling by creating a
                                            pseudo-function that will always have the value of the first argument filled
                                            in. Fortunately, I came across a brand new JavaScript library called jPaq (h<a
                                                    href="http://jpaq.org/" rel="nofollow">ttp://jpaq.org/</a>) which
                                            provides this functionality. The best thing about the library is the fact
                                            that you can download your own build which contains only the code that you
                                            will need.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2011-02-07T16:45:52" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="4923899"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 2.5"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f2.5%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/4923899/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/4923899/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-4923899" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/4923899/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2011-02-07 16:45:52Z'>Feb 7, 2011 at 16:45</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Feb 7, 2011 at 16:45. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/4923899/revisions" id="history-4923899"
                                                           title="show revision history for this post">
                                                            Clarence Fredericks
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="4923899" id="comments-4923899">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-4923899"
                                                  id="add-comment-4923899"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-4923899">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="73404393"></a>
                        <div class="answer js-answer" data-answerid="73404393" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="15" data-question-has-accepted-highest-score="0" data-score="0"
                             id="answer-73404393" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="73404393" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="0"
                                             itemprop="upvoteCount">
                                            0
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="73404393"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-73404393"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/73404393/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Here you have a practical example of were currying is being used at the
                                            moment.
                                            <a href="https://www.joshwcomeau.com/react/demystifying-styled-components/"
                                               rel="nofollow noreferrer">https://www.joshwcomeau.com/react/demystifying-styled-components/</a>
                                        </p>
                                        <p>Basically he is creating a poor man styled components and uses currying to
                                            &quot;preload&quot; the name of the tag when creating a new style for
                                            it.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2022-08-18T14:00:02" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="73404393"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 4.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/73404393/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/73404393/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-73404393" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/73404393/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2022-08-18 14:00:02Z'>Aug 18, 2022 at 14:00</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Aug 18, 2022 at 14:00. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/73404393/revisions" id="history-73404393"
                                                           title="show revision history for this post">
                                                            Andre Lopes
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="73404393" id="comments-73404393">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-73404393"
                                                  id="add-comment-73404393"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-73404393">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="16875840"></a>
                        <div class="answer js-answer" data-answerid="16875840" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="16" data-question-has-accepted-highest-score="0" data-score="0"
                             id="answer-16875840" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="16875840" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="0"
                                             itemprop="upvoteCount">
                                            0
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="16875840"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-16875840"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/16875840/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>Just wanted to add some resources for Functional.js:</p>

                                        <p>Lecture/conference explaining some applications
                                            <a href="http://www.youtube.com/watch?v=HAcN3JyQoyY" rel="nofollow">http://www.youtube.com/watch?v=HAcN3JyQoyY</a>
                                        </p>

                                        <p>Updated Functional.js library:
                                            <a href="https://github.com/loop-recur/FunctionalJS" rel="nofollow">https://github.com/loop-recur/FunctionalJS</a>
                                            Some nice helpers (sorry new here, no reputation :p):
                                            /loop-recur/PreludeJS</p>

                                        <p>I've been using this library a lot recently to reduce the repetition in an js
                                            IRC clients helper library. It's great stuff - really helps clean up and
                                            simplify code. </p>

                                        <p>In addition, if performance becomes an issue (but this lib is pretty light),
                                            it's easy to just rewrite using a native function.</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2013-06-01T18:21:00" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="16875840"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 3.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f3.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/16875840/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/16875840/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-16875840" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/16875840/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2013-06-01 18:21:00Z'>Jun 1, 2013 at 18:21</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Jun 1, 2013 at 18:21. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/16875840/revisions" id="history-16875840"
                                                           title="show revision history for this post">
                                                            megawac
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="16875840" id="comments-16875840">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-16875840"
                                                  id="add-comment-16875840"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-16875840">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name="65180031"></a>
                        <div class="answer js-answer" data-answerid="65180031" data-highest-scored="0"
                             data-parentid="113780" data-position-on-page="17" data-question-has-accepted-highest-score="0" data-score="0"
                             id="answer-65180031" itemprop="suggestedAnswer" itemscope
                             itemtype="https://schema.org/Answer">
                            <div class="post-layout">
                                <div class="votecell post-layout--left">
                                    <div class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-300"
                                         data-post-id="65180031" data-referrer="None">
                                        <button aria-label="Up vote"
                                                aria-pressed="false"
                                                class="js-vote-up-btn flex--item s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowUp" height="18" viewBox="0 0 18 18"
                                                 width="18">
                                                <path d="M1 12h16L9 4l-8 8Z"/>
                                            </svg>
                                        </button>
                                        <div class="js-vote-count flex--item d-flex fd-column ai-center fc-theme-body-font fw-bold fs-subheading py4"
                                             data-value="0"
                                             itemprop="upvoteCount">
                                            0
                                        </div>
                                        <button aria-label="Down vote"
                                                aria-pressed="false"
                                                class="js-vote-down-btn flex--item mb8 s-btn ba bar-pill c-pointer as-center bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                data-controller="s-tooltip"
                                                data-s-tooltip-placement="right"
                                                data-selected-classes="fc-theme-primary bc-theme-primary bg-theme-primary-100"
                                                data-unselected-classes="bc-black-225 fc-black-500 h:bg-theme-primary-200 h:fc-black-500 f:fc-black-050"
                                                title="This answer is not useful">
                                            <svg aria-hidden="true" class="svg-icon iconArrowDown" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="M1 6h16l-8 8-8-8Z"/>
                                            </svg>
                                        </button>


                                        <button aria-controls=""
                                                aria-pressed="false"
                                                class="js-saves-btn s-btn s-btn__unset c-pointer py4"
                                                data-controller="s-tooltip"
                                                data-post-id="65180031"
                                                data-post-type-id="2"
                                                data-s-popover-auto-show="false"
                                                data-s-popover-placement=""
                                                data-s-tooltip-placement="right"
                                                data-user-privilege-for-post-click="27"
                                                id="saves-btn-65180031"
                                                title="Save this answer."
                                                type="button"
                                        >
                                            <svg aria-hidden="true"
                                                 class="fc-theme-primary-400 js-saves-btn-selected d-none svg-icon iconBookmark"
                                                 height="18" viewBox="0 0 18 18" width="18">
                                                <path d="M3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                            <svg aria-hidden="true"
                                                 class="js-saves-btn-unselected svg-icon iconBookmarkAlt" height="18"
                                                 viewBox="0 0 18 18" width="18">
                                                <path d="m9 10.6 4 2.66V3H5v10.26l4-2.66ZM3 17V3c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2v14l-6-4-6 4Z"/>
                                            </svg>
                                        </button>


                                        <div aria-label="Accepted"
                                             class="js-accepted-answer-indicator flex--item fc-green-400 py6 mtn8 d-none"
                                             data-s-tooltip-placement="right" role="note"
                                             tabindex="0" title="Loading when this answer was accepted&#x2026;">
                                            <div class="ta-center">
                                                <svg aria-hidden="true" class="svg-icon iconCheckmarkLg" height="36"
                                                     viewBox="0 0 36 36" width="36">
                                                    <path d="m6 14 8 8L30 6v8L14 30l-8-8v-8Z"/>
                                                </svg>
                                            </div>
                                        </div>


                                        <a aria-label="Timeline"
                                           class="js-post-issue flex--item s-btn s-btn__unset c-pointer py6 mx-auto" data-controller="s-tooltip" data-ks-title="timeline"
                                           data-s-tooltip-placement="right" data-shortcut="T"
                                           href="/posts/65180031/timeline" title="Show activity on this post.">
                                            <svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18"
                                                 viewBox="0 0 19 18" width="19">
                                                <path d="M3 9a8 8 0 1 1 3.73 6.77L8.2 14.3A6 6 0 1 0 5 9l3.01-.01-4 4-4-4h3L3 9Zm7-4h1.01L11 9.36l3.22 2.1-.6.93L10 10V5Z"/>
                                            </svg>
                                        </a>

                                    </div>

                                </div>


                                <div class="answercell post-layout--right">

                                    <div class="s-prose js-post-body" itemprop="text">
                                        <p>I asked a similar question at <a
                                                href="https://softwareengineering.stackexchange.com/questions/384529/a-real-life-example-of-using-curry-function">https://softwareengineering.stackexchange.com/questions/384529/a-real-life-example-of-using-curry-function</a>
                                        </p>
                                        <p>But only after I use <a href="https://ramdajs.com/"
                                                                   rel="nofollow noreferrer">ramda</a> do I finally
                                            appreciate the usefulness of curry. So I will argue that if we need to chain
                                            functions together to process some input data one step a time, e.g. the
                                            promise chain example in the article <a
                                                    href="https://fr.umio.us/favoring-curry/" rel="nofollow noreferrer">Favoring
                                                Curry</a>, using curry by &quot;function first，data last&quot;, the code
                                            does look clean!</p>
                                    </div>
                                    <div class="mt24">
                                        <div class="d-flex fw-wrap ai-start jc-end gs8 gsy">
                                            <time datetime="2020-12-07T10:30:57" itemprop="dateCreated"></time>
                                            <div class="flex--item mr16" style="flex: 1 1 100px;">


                                                <div class="js-post-menu pt2" data-post-id="65180031"
                                                     data-post-type-id="2">

                                                    <div class="d-flex gs8 s-anchors s-anchors__muted fw-wrap">

                                                        <div class="flex--item">
                                                            <a class="js-share-link js-gps-track"
                                                               data-controller="se-share-sheet"
                                                               data-gps-track="post.click({ item: 2, priv: 27, post_type: 2 })"
                                                               data-s-popover-placement="bottom-start"
                                                               data-se-share-sheet-license-name="CC BY-SA 4.0"
                                                               data-se-share-sheet-license-url="https%3a%2f%2fcreativecommons.org%2flicenses%2fby-sa%2f4.0%2f"
                                                               data-se-share-sheet-location="2"
                                                               data-se-share-sheet-post-type="answer"
                                                               data-se-share-sheet-social="facebook twitter devto"
                                                               data-se-share-sheet-subtitle="(Includes your user id)"
                                                               data-se-share-sheet-title="Share a link to this answer"
                                                               href="/a/65180031/713809"
                                                               itemprop="url"
                                                               rel="nofollow"
                                                               title="Short permalink to this answer">Share</a>
                                                        </div>


                                                        <div class="flex--item">
                                                            <a class="js-edit-post js-gps-track"
                                                               data-gps-track="post.click({ item: 6, priv: 27, post_type: 2 })"
                                                               href="/posts/65180031/edit"
                                                               title="Revise and improve this post">Edit</a>
                                                        </div>

                                                        <div class="flex--item">
                                                            <button aria-controls=""
                                                                    class="s-btn s-btn__link js-follow-post js-follow-answer js-gps-track"
                                                                    data-controller="s-tooltip "
                                                                    data-gps-track="post.click({ item: 14, priv: 27, post_type: 2 })"
                                                                    data-s-popover-placement="bottom"
                                                                    data-s-tooltip-placement="bottom"
                                                                    id="btnFollowPost-65180031" title="Follow this answer to receive notifications"
                                                                    type="button">
                                                                Follow
                                                            </button>
                                                        </div>


                                                        <div class="flex--item">
                                                            <button class="js-flag-post-link s-btn s-btn__link js-gps-track"
                                                                    data-gps-track="post.click({ item: 5, priv: 27, post_type: 2 })"
                                                                    title="Flag this post for serious problems or moderator attention"
                                                                    type="button">
                                                                Flag
                                                            </button>
                                                        </div>


                                                    </div>
                                                    <div class="js-menu-popup-container"></div>
                                                </div>
                                            </div>
                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info ">
                                                    <div class="d-flex ">
                                                        <div class="user-action-time fl-grow1">
                                                            answered <a class="js-gps-track"
                                                                        data-gps-track="post.click({ item: 4, priv: 27, post_type: 2 })"
                                                                        href="/posts/65180031/revisions"
                                                                        title="show all edits to this post"><span
                                                                class='relativetime' title='2020-12-07 10:30:57Z'>Dec 7, 2020 at 10:30</span></a>
                                                        </div>

                                                    </div>
                                                    <div class="user-gravatar32">

                                                    </div>
                                                    <div class="user-details">

                                                        <div class="-flair">

                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="post-signature flex--item fl0">
                                                <div class="user-info">
                                                    <div class="user-details">
        <span class="community-wiki"
              title="This post is community owned as of Dec 7, 2020 at 10:30. Votes do not generate reputation, and it can be edited by users with 100 rep">
            community wiki
        </span>
                                                    </div>
                                                    <br>
                                                    <div class="user-details">
                                                        <a href="/posts/65180031/revisions" id="history-65180031"
                                                           title="show revision history for this post">
                                                            Qiulang
                                                        </a>
                                                    </div>
                                                </div>

                                            </div>
                                        </div>


                                    </div>

                                </div>


                                <span class="d-none" itemprop="commentCount"></span>
                                <div class="post-layout--right js-post-comments-component">
                                    <div class="comments js-comments-container bt bc-black-200 mt12  dno"
                                         data-min-length="15"
                                         data-post-id="65180031" id="comments-65180031">
                                        <ul class="comments-list js-comments-list"
                                            data-addlink-disabled="false"
                                            data-canpost="true"
                                            data-cansee="false"
                                            data-comments-unavailable="false"
                                            data-remaining-comments-count="0">

                                        </ul>
                                        <div class="comment-form">
                                            <form class=" "
                                                  data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;."
                                                  data-textarea-id="comment-input-65180031"
                                                  id="add-comment-65180031"></form>
                                        </div>
                                    </div>

                                    <div id="comments-link-65180031">
                                        <a class="js-add-link comments-link"
                                           href=#
                                           href="#" role="button" title="Use comments to ask for more information or suggest improvements. Avoid comments like &#x201C;&#x2B;1&#x201D; or &#x201C;thanks&#x201D;.">Add a comment</a>
                                        <span class="js-link-separator dno">&nbsp;|&nbsp;</span>
                                        <a class="js-show-link comments-link dno"
                                           href=# onclick="" role="button"
                                           title="Expand to show all comments on this post"></a>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <a name='new-answer'></a>
                        <form action="/questions/113780/answer/submit" class="js-add-answer-component post-form d-none" id="post-form"
                              method="post">
                            <input id="post-id" type="hidden" value="113780"/>
                            <input id="qualityBanWarningShown" name="qualityBanWarningShown" type="hidden"
                                   value="false"/>
                            <input name="referrer" type="hidden"
                                   value="https://stackoverflow.com/users/713809/byron-katz"/>
                            <h2 class="space" id="your-answer-header">
                                Your Answer
                            </h2>


                            <script>
                                StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                    StackExchange.snippets.init();
                });
            });
        }, "code-snippets");
                            </script>


                            <script>
                                StackExchange.ready(function() {
        var channelOptions = {
            tags: "".split(" "),
            id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                    createEditor();
                });
            }
            else {
                createEditor();
            }
        });

        function createEditor() {
            StackExchange.prepareEditor({
                useStacksEditor: false,
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: false,
                noModals: true,
                showLowRepImageUploadWarning: false,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                    brandingHtml: "Powered by \u003ca href=\"https://imgur.com/\"\u003e\u003csvg class=\"svg-icon\" width=\"50\" height=\"18\" viewBox=\"0 0 50 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"\u003e\u003ctitle\u003eImgur Logo\u003c/title\u003e\u003cpath d=\"M46.1709 9.17788C46.1709 8.26454 46.2665 7.94324 47.1084 7.58816C47.4091 7.46349 47.7169 7.36433 48.0099 7.26993C48.9099 6.97997 49.672 6.73443 49.672 5.93063C49.672 5.22043 48.9832 4.61182 48.1414 4.61182C47.4335 4.61182 46.7256 4.91628 46.0943 5.50789C45.7307 4.9328 45.2525 4.66231 44.6595 4.66231C43.6264 4.66231 43.1481 5.28821 43.1481 6.59048V11.9512C43.1481 13.2535 43.6264 13.8962 44.6595 13.8962C45.6924 13.8962 46.1709 13.2535 46.1709 11.9512V9.17788Z\"/\u003e\u003cpath d=\"M32.492 10.1419C32.492 12.6954 34.1182 14.0484 37.0451 14.0484C39.9723 14.0484 41.5985 12.6954 41.5985 10.1419V6.59049C41.5985 5.28821 41.1394 4.66232 40.1061 4.66232C39.0732 4.66232 38.5948 5.28821 38.5948 6.59049V9.60062C38.5948 10.8521 38.2696 11.5455 37.0451 11.5455C35.8209 11.5455 35.4954 10.8521 35.4954 9.60062V6.59049C35.4954 5.28821 35.0173 4.66232 34.0034 4.66232C32.9703 4.66232 32.492 5.28821 32.492 6.59049V10.1419Z\" /\u003e\u003cpath fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M25.6622 17.6335C27.8049 17.6335 29.3739 16.9402 30.2537 15.6379C30.8468 14.7755 30.9615 13.5579 30.9615 11.9512V6.59049C30.9615 5.28821 30.4833 4.66231 29.4502 4.66231C28.9913 4.66231 28.4555 4.94978 28.1109 5.50789C27.499 4.86533 26.7335 4.56087 25.7005 4.56087C23.1369 4.56087 21.0134 6.57349 21.0134 9.27932C21.0134 11.9852 23.003 13.913 25.3754 13.913C26.5612 13.913 27.4607 13.4902 28.1109 12.6616C28.1109 12.7229 28.1161 12.7799 28.121 12.8346C28.1256 12.8854 28.1301 12.9342 28.1301 12.983C28.1301 14.4373 27.2502 15.2321 25.777 15.2321C24.8349 15.2321 24.1352 14.9821 23.5661 14.7787C23.176 14.6393 22.8472 14.5218 22.5437 14.5218C21.7977 14.5218 21.2429 15.0123 21.2429 15.6887C21.2429 16.7375 22.9072 17.6335 25.6622 17.6335ZM24.1317 9.27932C24.1317 7.94324 24.9928 7.09766 26.1024 7.09766C27.2119 7.09766 28.0918 7.94324 28.0918 9.27932C28.0918 10.6321 27.2311 11.5116 26.1024 11.5116C24.9737 11.5116 24.1317 10.6491 24.1317 9.27932Z\"/\u003e\u003cpath d=\"M16.8045 11.9512C16.8045 13.2535 17.2637 13.8962 18.2965 13.8962C19.3298 13.8962 19.8079 13.2535 19.8079 11.9512V8.12928C19.8079 5.82936 18.4879 4.62866 16.4027 4.62866C15.1594 4.62866 14.279 4.98375 13.3609 5.88013C12.653 5.05154 11.6581 4.62866 10.3573 4.62866C9.34336 4.62866 8.57809 4.89931 7.9466 5.5079C7.58314 4.9328 7.10506 4.66232 6.51203 4.66232C5.47873 4.66232 5.00066 5.28821 5.00066 6.59049V11.9512C5.00066 13.2535 5.47873 13.8962 6.51203 13.8962C7.54479 13.8962 8.0232 13.2535 8.0232 11.9512V8.90741C8.0232 7.58817 8.44431 6.91179 9.53458 6.91179C10.5104 6.91179 10.893 7.58817 10.893 8.94108V11.9512C10.893 13.2535 11.3711 13.8962 12.4044 13.8962C13.4375 13.8962 13.9157 13.2535 13.9157 11.9512V8.90741C13.9157 7.58817 14.3365 6.91179 15.4269 6.91179C16.4027 6.91179 16.8045 7.58817 16.8045 8.94108V11.9512Z\"/\u003e\u003cpath d=\"M3.31675 6.59049C3.31675 5.28821 2.83866 4.66232 1.82471 4.66232C0.791758 4.66232 0.313354 5.28821 0.313354 6.59049V11.9512C0.313354 13.2535 0.791758 13.8962 1.82471 13.8962C2.85798 13.8962 3.31675 13.2535 3.31675 11.9512V6.59049Z\" /\u003e\u003cpath d=\"M1.87209 0.400291C0.843612 0.400291 0 1.1159 0 1.98861C0 2.87869 0.822846 3.57676 1.87209 3.57676C2.90056 3.57676 3.7234 2.87869 3.7234 1.98861C3.7234 1.1159 2.90056 0.400291 1.87209 0.400291Z\" fill=\"#1BB76E\"/\u003e\u003c/svg\u003e\u003c/a\u003e",
                    contentPolicyHtml: "User contributions licensed under \u003ca href=\"https://stackoverflow.com/help/licensing\"\u003eCC BY-SA\u003c/a\u003e \u003ca href=\"https://stackoverflow.com/legal/acceptable-use-policy\"\u003e(content policy)\u003c/a\u003e",
                    allowUrls: true
                },
                onDemand: false,
                discardSelector: ".discard-answer",
                enableTables: true,
                isStacksEditorPreviewEnabled: false
                ,userId:713809,enableTables:true,enableSnippets:true
            });
                    }
    });
                            </script>
                            <div class="post-editor js-post-editor" id="post-editor">


                                <div class="ps-relative">
                                    <div class="wmd-container mb8">
                                        <div class="wmd-button-bar btr-sm" id="wmd-button-bar"></div>
                                        <div aria-hidden="true"
                                             class="ai-content-policy-notice js-ai-policy-notice fc-black p8 bl br bc-black-300 d-none">
                                            <div class="d-flex jc-space-between ac-center gsx gs2">
                                                <p class="flex--item as-center"><b>Reminder:</b> Answers generated by
                                                    artificial intelligence tools are not allowed on Stack Overflow. <a
                                                            href="/help/ai-policy">Learn more</a></p>
                                                <button class="flex--item js-dismiss-ai-banner s-btn s-btn__sm s-btn__icon fc-black">
                                                    <svg aria-hidden="true" class="svg-icon iconClearSm" height="14"
                                                         viewBox="0 0 14 14" width="14">
                                                        <path d="M12 3.41 10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7 12 3.41Z"/>
                                                    </svg>
                                                </button>
                                            </div>
                                        </div>
                                        <input name="AIPolicyNoticeShown" type="hidden" value="true"/>
                                        <div class="js-stacks-validation">
                                            <div class="ps-relative">
                        <textarea aria-labelledby="your-answer-header"
                                  class="wmd-input s-input bar0 js-post-body-field"
                                  cols="92"
                                  data-editor-type="wmd"
                                  data-min-length=""
                                  data-post-type-id="2" id="wmd-input"
                                  name="post-text"
                                  rows="15"
                                  tabindex="101"></textarea>
                                            </div>
                                            <div class="s-input-message mt4 d-none js-stacks-validation-message"></div>
                                        </div>
                                    </div>
                                </div>

                                <aside aria-hidden="true"
                                       class="d-flex ai-start jc-space-between js-answer-help s-notice s-notice__warning pb0 pr4 pt4 mb8 d-none" role="status">
                                    <div class="flex--item pt8">
                                        <p>Thanks for contributing an answer to Stack Overflow!</p>
                                        <ul>
                                            <li>Please be sure to <em>answer the question</em>. Provide details and
                                                share your research!
                                            </li>
                                        </ul>
                                        <p>But <em>avoid</em> …</p>
                                        <ul>
                                            <li>Asking for help, clarification, or responding to other answers.</li>
                                            <li>Making statements based on opinion; back them up with references or
                                                personal experience.
                                            </li>
                                        </ul>
                                        <p>To learn more, see our <a href="/help/how-to-answer">tips on writing great
                                            answers</a>.</p>
                                    </div>
                                    <button class="flex--item js-answer-help-close-btn s-btn s-btn__muted fc-black-600">
                                        <svg aria-hidden="true" class="svg-icon iconClear" height="18" viewBox="0 0 18 18"
                                             width="18">
                                            <path d="M15 4.41 13.59 3 9 7.59 4.41 3 3 4.41 7.59 9 3 13.59 4.41 15 9 10.41 13.59 15 15 13.59 10.41 9 15 4.41Z"/>
                                        </svg>
                                    </button>
                                </aside>


                                <div>
                                    <div class="fc-success h24" id="draft-saved" style="display:none;">Draft saved</div>
                                    <div class="fc-error h24" id="draft-discarded" style="display:none;">Draft
                                        discarded
                                    </div>
                                </div>


                                <div class="s-prose mb16 wmd-preview js-wmd-preview" id="wmd-preview"></div>
                                <div></div>

                                <div class="edit-block">
                                    <input id="fkey" name="fkey" type="hidden"
                                           value="e4eb9ddaf12ea2d2a9fa3af2b81a4e28284a8553f2ae1b7f0f153630635d6de6">
                                    <input id="author" name="author" type="text">
                                </div>

                            </div>


                            <div class="ps-relative">

                            </div>

                            <div class="form-submit clear-both d-flex gsx gs4">
                                <button autocomplete="off" class="flex--item s-btn s-btn__filled s-btn__icon"
                                        id="submit-button" tabindex="120" type="submit">
                                    Post Your Answer
                                </button>
                                <button class="flex--item s-btn s-btn__danger discard-answer dno">
                                    Discard
                                </button>
                            </div>
                            <div aria-live="polite" class="js-general-error general-error clear-both d-none"></div>
                        </form>
                        <div class="form-submit print:d-none js-add-answer-component" id="show-editor-button">
                            <button class="js-add-another-answer s-btn s-btn__filled"
                                    data-confirm-fancy-accept-button=""
                                    data-confirm-fancy-body=""
                                    data-confirm-fancy-title=""
                                    data-confirm-text="Are you sure you want to add another answer?&#xA;&#xA;You could use the edit link to refine and improve your existing answer, instead."
                                    data-confirm-use-fancy="False">
                                Add Another Answer
                            </button>
                        </div>
                        <script>
                            StackExchange.ready(function () {
                                        $("#show-editor-button input, #show-editor-button button").click(function () {
                                            var showEditor = function () {
                                                $("#show-editor-button").addClass("d-none");
                                                $("#post-form").removeClass("d-none");

                                                // check if we're using stacksEditor or not based on the presence of required supporting classes
                                                var editorProp = $(".js-stacks-editor-container").length ? "stacksEditor" : "editor";
                                                StackExchange[editorProp].finallyInit();
                                            };

                                            var useFancy = $(this).data('confirm-use-fancy');
                                            if (useFancy == 'True') {
                                                var popupTitle = $(this).data('confirm-fancy-title');
                                                var popupBody = $(this).data('confirm-fancy-body');
                                                var popupAccept = $(this).data('confirm-fancy-accept-button');

                                                $(this).loadPopup({
                                                    url: '/post/self-answer-popup',
                                                    loaded: function (popup) {
                                                        var pTitle = $(popup).find('h2');
                                                        var pBody = $(popup).find('.popup-body');
                                                        var pSubmit = $(popup).find('.popup-submit');

                                                        pTitle.text(popupTitle);
                                                        pBody.html(popupBody);
                                                        pSubmit.text(popupAccept).click(showEditor);
                                                    }
                                                })
                                            } else {
                                                var confirmText = $(this).data('confirm-text');
                                                if (confirmText ? confirm(confirmText) : true) {
                                                    showEditor();
                                                }
                                            }
                                        });
                                    });
                        </script>


                        <h2 class="bottom-notice" data-loc="1">
                            <div>
                                Not the answer you&#x27;re looking for? Browse other questions tagged
                                <ul class='ml0 list-ls-none js-post-tag-list-wrapper d-inline'>
                                    <li class='d-inline mr4 js-post-tag-list-item'><a
                                            aria-label="show questions tagged &#39;javascript&#39;" aria-labelledby="tag-javascript-tooltip-container"
                                            class="post-tag"
                                            href="/questions/tagged/javascript" rel="tag"
                                            title="show questions tagged &#39;javascript&#39;">javascript</a></li>
                                    <li class='d-inline mr4 js-post-tag-list-item'><a aria-label="show questions tagged &#39;function&#39;"
                                                                                      aria-labelledby="tag-function-tooltip-container"
                                                                                      class="post-tag"
                                                                                      href="/questions/tagged/function"
                                                                                      rel="tag"
                                                                                      title="show questions tagged &#39;function&#39;">function</a>
                                    </li>
                                    <li class='d-inline mr4 js-post-tag-list-item'><a aria-label="show questions tagged &#39;currying&#39;"
                                                                                      aria-labelledby="tag-currying-tooltip-container"
                                                                                      class="post-tag"
                                                                                      href="/questions/tagged/currying"
                                                                                      rel="tag"
                                                                                      title="show questions tagged &#39;currying&#39;">currying</a>
                                    </li>
                                    <li class='d-inline mr4 js-post-tag-list-item'><a
                                            aria-label="show questions tagged &#39;partial-application&#39;" aria-labelledby="tag-partial-application-tooltip-container"
                                            class="post-tag"
                                            href="/questions/tagged/partial-application" rel="tag"
                                            title="show questions tagged &#39;partial-application&#39;">partial-application</a>
                                    </li>
                                </ul>
                                or <a href="/questions/ask">ask your own question</a>.
                            </div>
                        </h2>
                    </div>
                </div>


                <div aria-label="sidebar" class="show-votes" id="sidebar" role="complementary">


                    <div class="s-sidebarwidget s-sidebarwidget__yellow s-anchors s-anchors__grayscale mb16"
                         data-tracker="cb=1">
                        <ul class="d-block p0 m0">
                            <li class="s-sidebarwidget--header s-sidebarwidget__small-bold-text d-flex fc-black-500 d:fc-black-600 bb bbw1">
                                The Overflow Blog
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <svg aria-hidden="true" class="va-text-top svg-icon iconPencilSm" height="14"
                                         viewBox="0 0 14 14" width="14">
                                        <path d="m2 10.12 6.37-6.43 1.88 1.88L3.88 12H2v-1.88Z" fill="#F1B600"/>
                                        <path d="m11.1 1.71 1.13 1.12c.2.2.2.51 0 .71L11.1 4.7 9.21 2.86l1.17-1.15c.2-.2.51-.2.71 0Z"
                                              fill="#E87C87"/>
                                    </svg>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;The Overflow Blog&quot;,&quot;https://stackoverflow.blog/2024/03/15/your-whole-repo-fits-in-the-context-window/&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 1, position: 0 })"
                                       href="https://stackoverflow.blog/2024/03/15/your-whole-repo-fits-in-the-context-window/">Your whole
                                        repo fits in the context window</a>
                                </div>
                            </li>
                            <li class="s-sidebarwidget--header s-sidebarwidget__small-bold-text d-flex fc-black-500 d:fc-black-600 bb bbw1">
                                Featured on Meta
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <div class="favicon favicon-stackexchangemeta" title="Meta Stack Exchange"></div>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;Featured on Meta&quot;,&quot;https://meta.stackexchange.com/questions/398127/our-partnership-with-google-and-commitment-to-socially-responsible-ai&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 3, position: 1 })"
                                       href="https://meta.stackexchange.com/questions/398127/our-partnership-with-google-and-commitment-to-socially-responsible-ai">Our
                                        partnership with Google and commitment to socially responsible AI</a>
                                </div>
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <div class="favicon favicon-stackexchangemeta" title="Meta Stack Exchange"></div>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;Featured on Meta&quot;,&quot;https://meta.stackexchange.com/questions/398279/shifting-the-data-dump-schedule-a-proposal&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 3, position: 2 })"
                                       href="https://meta.stackexchange.com/questions/398279/shifting-the-data-dump-schedule-a-proposal">Shifting
                                        the data dump schedule: A proposal</a>
                                </div>
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <div class="favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;Featured on Meta&quot;,&quot;https://meta.stackoverflow.com/questions/421831/temporary-policy-generative-ai-e-g-chatgpt-is-banned&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 6, position: 3 })"
                                       href="https://meta.stackoverflow.com/questions/421831/temporary-policy-generative-ai-e-g-chatgpt-is-banned">Temporary
                                        policy: Generative AI (e.g., ChatGPT) is banned</a>
                                </div>
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <div class="favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;Featured on Meta&quot;,&quot;https://meta.stackoverflow.com/questions/429467/2024-community-moderator-election-results&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 6, position: 4 })"
                                       href="https://meta.stackoverflow.com/questions/429467/2024-community-moderator-election-results">2024
                                        Community Moderator Election Results</a>
                                </div>
                            </li>
                            <li class="s-sidebarwidget--header s-sidebarwidget__small-bold-text d-flex fc-black-500 d:fc-black-600 bb bbw1">
                                Hot Meta Posts
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <span class="fc-black-400" title="Question score (upvotes - downvotes)">8</span>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;Hot Meta Posts&quot;,&quot;https://meta.stackoverflow.com/questions/429494/how-can-i-improve-this-question-handle-commits-in-git-rebase-i-in-the-oppos&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 7, position: 5 })"
                                       href="https://meta.stackoverflow.com/questions/429494/how-can-i-improve-this-question-handle-commits-in-git-rebase-i-in-the-oppos"
                                       title="How can I improve this question? &quot;Handle commits in `git rebase -i` in the opposite order&quot;">How can I
                                        improve this question? &quot;Handle commits in `git rebase -i` in the...</a>
                                </div>
                            </li>
                            <li class="s-sidebarwidget--item d-flex px16">
                                <div class="flex--item1 fl-shrink0">
                                    <span class="fc-black-400" title="Question score (upvotes - downvotes)">11</span>
                                </div>
                                <div class="flex--item wmn0 ow-break-word">
                                    <a class="js-gps-track"
                                       data-ga="[&quot;community bulletin board&quot;,&quot;Hot Meta Posts&quot;,&quot;https://meta.stackoverflow.com/questions/429503/why-is-this-question-about-shell-programming-closed-as-not-about-programming-or&quot;,null,null]"
                                       data-gps-track="communitybulletin.click({ priority: 7, position: 6 })"
                                       href="https://meta.stackoverflow.com/questions/429503/why-is-this-question-about-shell-programming-closed-as-not-about-programming-or"
                                       title="Why is this question about shell programming closed as &quot;not about programming or software development&quot;?">Why is
                                        this question about shell programming closed as &quot;not about
                                        programming...</a>
                                </div>
                            </li>
                        </ul>
                    </div>


                    <style>
                    </style>
                    <div class="js-zone-container zone-container-sidebar">
                        <div class="everyonelovesstackoverflow everyoneloves__top-sidebar" id="dfp-tsb"></div>
                        <div class="js-report-ad-button-container " style="width: 300px"></div>
                    </div>
                    <div class="js-zone-container zone-container-sidebar">
                        <div class="everyonelovesstackoverflow everyoneloves__mid-sidebar" id="dfp-msb"></div>
                        <div class="js-report-ad-button-container " style="width: 300px"></div>
                    </div>
                    <div id="hireme"></div>
                    <div class="s-sidebarwidget mb16 module">
                        <div class="s-sidebarwidget--header d-flex ai-center">
                            <a class="js-chat-ad-link" href="https://chat.stackoverflow.com/">Visit chat</a>
                        </div>
                        <div class="s-sidebarwidget--content s-sidebarwidget__items d-none js-chat-ad-rooms"></div>
                    </div>


                    <script>
                        // <!--
        StackExchange.ready(function () {
            var options = {
                chatUrl: 'https://chat.stackoverflow.com/',
                reloadUrl: '/api/recent-chat',
                preloadedData: null,
                tagBased: true,
            };

            StackExchange.chatAd.init(options);
        });
    // -->
                    </script>

                    <div class="module sidebar-linked">
                        <h4 id="h-linked">Linked</h4>
                        <div class="linked" data-tracker="lq=1">
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 33670794, position: 0 })">
                                <a href="/q/33670794" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes  default">-1</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/33670794/what-is-the-use-of-currying-in-javascript?noredirect=1">What is the use of currying in javascript?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 26680104, position: 1 })">
                                <a href="/q/26680104" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes  default">2</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/26680104/javascript-what-is-a-nice-curry-example?noredirect=1">Javascript: What is a nice curry example?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 75110200, position: 2 })">
                                <a href="/q/75110200" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes  default">1</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/75110200/why-to-return-arrow-function-from-a-function?noredirect=1">Why to return arrow function from a function</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 111102, position: 3 })">
                                <a href="/q/111102" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted extra-large">7619</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/111102/how-do-javascript-closures-work?noredirect=1">How do JavaScript closures work?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 35167934, position: 4 })">
                                <a href="/q/35167934" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes  default">10</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/35167934/javascript-why-return-function-in-a-function?noredirect=1">JavaScript Why return function in a function?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 14177605, position: 5 })">
                                <a href="/q/14177605" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">2</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/14177605/seeking-clarification-on-anonymous-function-javascript-logic?noredirect=1">Seeking clarification on anonymous function JavaScript
                                    logic</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 66418469, position: 6 })">
                                <a href="/q/66418469" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">2</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/66418469/is-there-a-way-to-find-out-what-key-of-an-object-is-trying-to-be-accessed?noredirect=1">Is there a way to find out what key of an object is trying
                                    to be accessed?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 18476591, position: 7 })">
                                <a href="/q/18476591" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes  default">0</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/18476591/factory-that-builds-functions-whose-contents-are-different?noredirect=1">Factory that builds functions whose contents are
                                    different?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 26171119, position: 8 })">
                                <a href="/q/26171119" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">0</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/26171119/how-might-the-syntax-fooab-be-useful?noredirect=1">How might the syntax `foo(a)(b)` be useful?</a>
                            </div>
                            <div class="spacer js-gps-track"
                                 data-gps-track="linkedquestion.click({ source_post_id: 113780, target_question_id: 23073668, position: 9 })">
                                <a href="/q/23073668" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes  default">0</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/23073668/are-there-any-drawbacks-in-doing-this-adding-a-new-function-in-prototype-that-r?noredirect=1">are there any drawbacks in doing this: adding a new
                                    function in prototype that returns the same function with arguments applied</a>
                            </div>
                            <div class="spacer more ml32 pl16 pt8">
                                <a href="/questions/linked/113780">See more linked questions</a>
                            </div>
                        </div>
                    </div>


                    <div class="module sidebar-related">
                        <h4 id="h-related">Related</h4>
                        <div class="related js-gps-related-questions" data-tracker="rq=3">
                            <div class="spacer" data-question-id="36314">
                                <a href="/q/36314" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted large">819</div>
                                </a>
                                <a class="question-hyperlink" href="/questions/36314/what-is-currying">What is &#39;Currying&#39;?</a>
                            </div>
                            <div class="spacer" data-question-id="4394747">
                                <a href="/q/4394747" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">13</div>
                                </a>
                                <a class="question-hyperlink" href="/questions/4394747/javascript-curry-function">JavaScript
                                    curry function</a>
                            </div>
                            <div class="spacer" data-question-id="7769771">
                                <a href="/q/7769771" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">3</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/7769771/javascript-curry-partial-function-invokation-for-object-functions">javascript curry/partial function invokation for object
                                    functions</a>
                            </div>
                            <div class="spacer" data-question-id="7932954">
                                <a href="/q/7932954" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">6</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/7932954/when-to-use-currying-and-partial-functions-in-javascript">When to use currying and partial functions in
                                    JavaScript</a>
                            </div>
                            <div class="spacer" data-question-id="18431457">
                                <a href="/q/18431457" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">1</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/18431457/how-curry-function-should-really-work">How curry function should really work?</a>
                            </div>
                            <div class="spacer" data-question-id="19042221">
                                <a href="/q/19042221" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">8</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/19042221/how-do-you-curry-any-javascript-function-of-arbitrary-arity">How do you curry any javascript function of arbitrary
                                    arity?</a>
                            </div>
                            <div class="spacer" data-question-id="27445779">
                                <a href="/q/27445779" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">0</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/27445779/javascript-curry-function-beneficial-for-this-code">Javascript Curry Function Beneficial For This Code?</a>
                            </div>
                            <div class="spacer" data-question-id="32747333">
                                <a href="/q/32747333" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">20</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/32747333/what-are-real-use-cases-of-currying">What are real use cases of currying?</a>
                            </div>
                            <div class="spacer" data-question-id="58080109">
                                <a href="/q/58080109" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes default">1</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/58080109/advantages-of-using-curried-functions-over-a-normal-function-in-javascript">Advantages of using curried functions over a normal
                                    function in javascript</a>
                            </div>
                            <div class="spacer" data-question-id="65279852">
                                <a href="/q/65279852" title="Question score (upvotes - downvotes)">
                                    <div class="answer-votes answered-accepted default">1</div>
                                </a>
                                <a class="question-hyperlink"
                                   href="/questions/65279852/javascript-use-cases-of-currying">Javascript: Use cases of currying</a>
                            </div>
                        </div>
                    </div>
                    <script type="text/javascript">
                        $(document).ready(function() {
                     $(".js-gps-related-questions .spacer").click(function () {
                        fireRelatedEvent($(this).index() + 1, $(this).data('question-id'));
                     });

                 function fireRelatedEvent(position, questionId) {
                     StackExchange.using("gps", function() {
                         StackExchange.gps.track('related_questions.click',
                         {
                             position: position,
                             originQuestionId: 113780,
                             relatedQuestionId: +questionId,
                             location: 'sidebar',
                             source: 'Baseline'
                         });
                     });
                 }
             });
                    </script>


                    <div class="module tex2jax_ignore" id="hot-network-questions">
                        <h4>
                            <a class="js-gps-track s-link s-link__inherit"
                               data-gps-track="posts_hot_network.click({ item_type:1, location:11 })"
                               href="https://stackexchange.com/questions?tab=hot">
                                Hot Network Questions
                            </a>
                        </h4>
                        <ul>
                            <li>
                                <div class="favicon favicon-mathoverflow" title="MathOverflow"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:504 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://mathoverflow.net/questions/467147/whether-the-pure-implicational-fragment-of-intuitionistic-propositional-logic-is">
                                    Whether the pure implicational fragment of intuitionistic propositional logic is a
                                    finitely-many valued logic
                                </a>

                            </li>
                            <li>
                                <div class="favicon favicon-english"
                                     title="English Language &amp; Usage Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:97 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://english.stackexchange.com/questions/620623/why-can-you-omit-is-at-the-end-of-no-matter-how-foul-their-mood">
                                    Why can you omit &quot;is&quot; at the end of &quot;no matter how foul their mood&quot;?
                                </a>

                            </li>
                            <li>
                                <div class="favicon favicon-electronics"
                                     title="Electrical Engineering Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:135 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://electronics.stackexchange.com/questions/706371/how-necessary-are-gate-resistors-for-mosfet-gate-driving">
                                    How necessary are gate resistors for MOSFET gate driving?
                                </a>

                            </li>
                            <li>
                                <div class="favicon favicon-tex" title="TeX - LaTeX Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:85 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://tex.stackexchange.com/questions/713392/how-to-use-foreach-and-newtheorem-together">
                                    How to use \foreach and \newtheorem together?
                                </a>

                            </li>
                            <li>
                                <div class="favicon favicon-unix" title="Unix &amp; Linux Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:106 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://unix.stackexchange.com/questions/772538/what-is-the-tee-history-file">
                                    What is the &#x27;.tee_history&#x27; file?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-diy" title="Home Improvement Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:73 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://diy.stackexchange.com/questions/296454/who-do-i-call-for-mold-and-rotting-wood-floor-problem-from-a-bad-sealing-at-the">
                                    Who do I call for mold and rotting wood floor problem from a bad sealing at the
                                    balcony?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-puzzling" title="Puzzling Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:559 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://puzzling.stackexchange.com/questions/126008/a-few-signposts">
                                    a few signposts
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-ell" title="English Language Learners Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:481 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://ell.stackexchange.com/questions/349911/what-shade-of-meaning-is-the-word-proper-supposed-to-add-to-the-sentence">
                                    What shade of meaning is the word &quot;proper&quot; supposed to add to the
                                    sentence?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-politics" title="Politics Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:475 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://politics.stackexchange.com/questions/86419/how-does-massachusetts-ratify-proposed-amendments-to-the-constitution-of-the-uni">
                                    How does Massachusetts ratify proposed amendments to the constitution of the United
                                    States?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-math" title="Mathematics Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:69 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://math.stackexchange.com/questions/4882590/probability-distribution-of-a-random-variable-interview">
                                    Probability distribution of a random variable - Interview
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-politics" title="Politics Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:475 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://politics.stackexchange.com/questions/86380/why-was-the-national-popular-vote-interstate-compact-written-not-to-take-effect">
                                    Why was the National Popular Vote Interstate Compact written not to take effect
                                    until it has an absolute majority of electoral votes?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-codegolf" title="Code Golf Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:200 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://codegolf.stackexchange.com/questions/271853/argument-of-a-complex-number-cops">
                                    Argument of a complex number (Cops)
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-literature" title="Literature Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:668 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://literature.stackexchange.com/questions/26439/what-does-it-mean-for-a-bad-eye-to-touch-something">
                                    What does it mean for a &quot;bad eye&quot; to &quot;touch&quot; something?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-ell" title="English Language Learners Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:481 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://ell.stackexchange.com/questions/349924/should-it-be-is-or-are-the-only-thing-we-havent-seen-are-locusts">
                                    Should it be &quot;IS&quot; or &quot;ARE&quot;? --- &quot;The only thing we haven&#x27;t
                                    seen ARE locusts.&quot;
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-tex" title="TeX - LaTeX Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:85 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://tex.stackexchange.com/questions/713353/specialize-behaviors-of-super-and-subscript-for-self-defined-commands">
                                    Specialize behaviors of super and subscript for self defined commands
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-retrocomputing" title="Retrocomputing Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:648 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://retrocomputing.stackexchange.com/questions/29684/is-it-possible-to-know-which-lines-in-the-gameboy-color-cartridge-connection-is">
                                    Is it possible to know which lines in the Gameboy Color cartridge connection is
                                    missing by looking at the glitched Nintendo logo?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-parenting" title="Parenting Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:228 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://parenting.stackexchange.com/questions/44069/teacher-telling-4th-grade-student-i-hate-you">
                                    Teacher telling 4th grade student &quot;I hate you&quot;
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-rpg" title="Role-playing Games Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:122 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://rpg.stackexchange.com/questions/210875/does-the-wisdom-perception-check-to-notice-the-area-covered-by-spike-growth-re">
                                    Does the Wisdom (Perception) check to notice the area covered by Spike Growth
                                    require an action?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-law" title="Law Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:617 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://law.stackexchange.com/questions/101375/do-initial-email-exchanges-between-an-attorney-and-potential-client-constitute">
                                    Do initial email exchanges between an attorney and potential client constitute
                                    &quot;client-attorney relationship&quot;?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-electronics"
                                     title="Electrical Engineering Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:135 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://electronics.stackexchange.com/questions/706409/why-is-the-level-wiper-wired-like-this-in-the-op-amp-stage">
                                    Why is the level wiper wired like this in the op-amp stage?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-softwareengineering"
                                     title="Software Engineering Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:131 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://softwareengineering.stackexchange.com/questions/452449/how-do-unit-tests-facilitate-refactoring-without-introducing-regressions">
                                    How do unit tests facilitate refactoring without introducing regressions?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-stats" title="Cross Validated"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:65 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://stats.stackexchange.com/questions/642794/is-descriptive-statistics-enough-to-compare-test-scores-of-students-in-a-class">
                                    Is descriptive statistics enough to compare test scores of students in a class?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-writing" title="Writing Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:166 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://writing.stackexchange.com/questions/69081/will-putting-on-kindle-or-making-audio-books-hurt-profits-in-the-long-run">
                                    Will putting on Kindle, or making Audio books, hurt profits in the Long Run?
                                </a>

                            </li>
                            <li class="dno js-hidden">
                                <div class="favicon favicon-biology" title="Biology Stack Exchange"></div>
                                <a class="js-gps-track question-hyperlink mb0"
                                   data-gps-track="site.switch({ item_type:11, target_site:375 }); posts_hot_network.click({ item_type:2, location:11 })"
                                   href="https://biology.stackexchange.com/questions/114329/who-demonstrated-that-phage-lamba-is-integrated-into-the-host-chromosome">
                                    Who demonstrated that phage lamba is integrated into the host chromosome?
                                </a>

                            </li>
                        </ul>

                        <a class="show-more js-show-more js-gps-track"
                           data-gps-track="posts_hot_network.click({ item_type:3, location:11 })"
                           href="#">
                            more hot questions
                        </a>
                    </div>

                    <div class="js-feed-link" id="feed-link">
                        <a href="/feeds/question/113780" title="Feed of this question and its answers">
                            <svg aria-hidden="true" class="fc-orange-400 svg-icon iconRss" height="18" viewBox="0 0 18 18"
                                 width="18">
                                <path d="M3 1a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H3Zm0 1.5c6.9 0 12.5 5.6 12.5 12.5H13C13 9.55 8.45 5 3 5V2.5Zm0 5c4.08 0 7.5 3.41 7.5 7.5H8c0-2.72-2.28-5-5-5V7.5Zm0 5c1.36 0 2.5 1.14 2.5 2.5H3v-2.5Z"/>
                            </svg>
                            Question feed
                        </a>
                    </div>
                    <aside aria-describedby="feed-modal-description" aria-hidden="true" aria-labelledby="feed-modal-title"
                           class="s-modal js-feed-link-modal" role="dialog"
                           tabindex="-1">
                        <div class="s-modal--dialog js-modal-dialog wmx4" data-controller="se-draggable"
                             role="document">
                            <h1 class="s-modal--header fw-bold js-first-tabbable" data-se-draggable-target="handle"
                                id="feed-modal-title" tabindex="0">
                                Subscribe to RSS
                            </h1>
                            <div class="d-flex gs4 gsy fd-column">
                                <div class="flex--item">
                                    <label class="d-block s-label c-default" for="feed-url">
                                        Question feed
                                        <p class="s-description mt2" id="feed-modal-description">To subscribe to this
                                            RSS feed, copy and paste this URL into your RSS reader.</p>
                                    </label>
                                </div>
                                <div class="d-flex ps-relative">
                                    <input class="s-input" id="feed-url" name="feed-url" readonly="readonly" type="text"
                                           value="https://stackoverflow.com/feeds/question/113780"/>
                                    <svg aria-hidden="true" class="s-input-icon fc-orange-400 svg-icon iconRss"
                                         height="18" viewBox="0 0 18 18" width="18">
                                        <path d="M3 1a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H3Zm0 1.5c6.9 0 12.5 5.6 12.5 12.5H13C13 9.55 8.45 5 3 5V2.5Zm0 5c4.08 0 7.5 3.41 7.5 7.5H8c0-2.72-2.28-5-5-5V7.5Zm0 5c1.36 0 2.5 1.14 2.5 2.5H3v-2.5Z"/>
                                    </svg>
                                </div>
                            </div>
                            <a aria-label="Close" class="s-modal--close s-btn s-btn__muted js-modal-close js-last-tabbable"
                               href="#">
                                <svg aria-hidden="true" class="svg-icon iconClearSm" height="14" viewBox="0 0 14 14"
                                     width="14">
                                    <path d="M12 3.41 10.59 2 7 5.59 3.41 2 2 3.41 5.59 7 2 10.59 3.41 12 7 8.41 10.59 12 12 10.59 8.41 7 12 3.41Z"/>
                                </svg>
                            </a>
                        </div>
                    </aside>

                </div>

            </div>
            <script>
                StackExchange.ready(function(){$.get('/posts/113780/ivc/4916?prg=8a512a93-14c1-46a3-b6d6-1260999103f3');});
            </script>
            <noscript>
                <div><img alt="" class="dno" height="0"
                          src="/posts/113780/ivc/4916?prg=8a512a93-14c1-46a3-b6d6-1260999103f3" width="0"></div>
            </noscript>
            <div id="js-codeblock-lang" style="display:none">lang-js</div>
        </div>

        <script>
            $('#wmd-input').one("keypress", function () {
            $.ajax({
                url: '/accounts/email-settings-form',
                cache: false,
                success: function (data) {
                    $('#submit-button').parent().prepend(data);
                }
            });
        });

        </script>


    </div>
</div>


<script type="text/javascript">
    var cam = cam || { opt: {} };
    var clcGamLoaderOptions = cam || { opt: {} };
    var opt = clcGamLoaderOptions.opt;

    opt.omni = 'BwoLCNKToInlueM8EAUQubcWGPT4BiACKAIwAzoyfGphdmFzY3JpcHR8ZnVuY3Rpb258Y3Vycnlpbmd8cGFydGlhbC1hcHBsaWNhdGlvbnxAAUgBWhIJTma28NC9gkARknI-hEkJG3nC_EWB5YIo_-zh';
    opt.refresh = !1;
    opt.refreshInterval = 90;
    opt.sf = !0;
    opt.hb = !1;
    opt.ll = !0;
    opt.tlb_position = 0;
    opt.personalization_consent = !0;
    opt.targeting_consent = !0;
    opt.performance_consent = !0;

    opt.targeting = {Registered:['true'],Reputation:['200'],'so-tag':['javascript','function','currying','partial-application'],'tag-reportable':['javascript','function','currying','partial-application'],'so_tag':['javascript','function','currying','partial_application'],NumberOfAnswers:['17'],'ProductVariant':['Light']};
    opt.adReportEnabled = !0;
    opt.adReportUrl = '/ads/report-ad';
    opt.adReportText = 'Report this ad';
	opt.adReportFileTypeErrorMessage = 'Please select a PNG or JPG file.';
    opt.adReportFileSizeErrorMessage = 'The file must be under 2 MiB.';
	opt.adReportErrorText = 'Error uploading ad report.';
	opt.adReportThanksText = 'Thanks for your feedback. We’ll review this against our code of conduct and take action if necessary.';
    opt.adReportLoginExpiredMessage = 'Your login session has expired, please login and try again.';
    opt.adReportLoginErrorMessage = 'An error occurred when loading the report form - please try again';
	opt.adReportModalClass = 'js-ad-report';
        opt.brandSurveyEnabled = true;
            opt.brandSurveySettings = [{"brandId":7,"lineItemIds":[6170355049,6170355058,6170355244,6168829383,6170355787,6170355799,6168829803,6170356261,6170356282,6170984786,6170985065,6168833181,6170358871,6170360326,6170360578,6168834204,6170361016,6170986253,6377604184,6378262502,6378262511,6377604211,6377604223,6377604700,6318450889,6318453241,6318453259,6318453310],"mode":"Collect"},{"brandId":8,"lineItemIds":[6389119380,6389119404,6389119347],"mode":"Collect"}];
    opt.perRequestGuid = '8a512a93-14c1-46a3-b6d6-1260999103f3';
    opt.responseHash = 'GjYbgFAH6GoV/AMLziPuEoJAADYmkVQn5&#x2B;iGTZKEhaQ=';


    opt.targeting.TargetingConsent = ['True'];
    opt.allowAccountTargetingForThisRequest = !0;

    const urlParams = new URLSearchParams(window.location.search);
    if (urlParams.has('dfptestads')) {
        const dfptestads = urlParams.get('dfptestads');
        opt.targeting.DfpTestAds = dfptestads;
    }
</script>
<script>
    ;(()=>{"use strict";var __webpack_modules__={23:(e,t,s)=>{s.d(t,{Z7:()=>l,eq:()=>d,kG:()=>r});const n=(a=location.pathname,/^\/tags\//.test(a)||/^\/questions\/tagged\//.test(a)?"tag-pages":/^\/discussions\//.test(a)||/^\/beta\/discussions/.test(a)?"discussions":/^\/$/.test(a)||/^\/home/.test(a)?"home-page":"question-pages");var a;let o=location.hostname;const i={slots:{lb:[[728,90]],mlb:[[728,90]],smlb:[[728,90]],bmlb:[[728,90]],sb:e=>"dfp-tsb"===e?[[300,250],[300,600]]:[[300,250]],"tag-sponsorship":[[730,135]],"mobile-below-question":[[320,50],[300,250]],msb:[[300,250],[300,600]],"talent-conversion-tracking":[[1,1]],"site-sponsorship":[[230,60]]},ids:{"dfp-tlb":"lb","dfp-mlb":"mlb","dfp-smlb":"smlb","dfp-bmlb":"bmlb","dfp-tsb":"sb","dfp-isb":"sb","dfp-tag":"tag-sponsorship","dfp-msb":"msb","dfp-sspon":"site-sponsorship","dfp-m-aq":"mobile-below-question"},idsToExcludeFromAdReports:["dfp-sspon"]};function r(){return Object.keys(i.ids)}function d(e){return i.idsToExcludeFromAdReports.indexOf(e)<0}function l(e){var t=e.split("_")[0];const s=i.ids[t];let a=i.slots[s];return"function"==typeof a&&(a=a(t)),{path:`/248424177/${o}/${s}/${n}`,sizes:a,zone:s}}},865:(e,t,s)=>{function n(e){return"string"==typeof e?document.getElementById(e):e}function a(e){return!!(e=n(e))&&"none"===getComputedStyle(e).display}function o(e){return!a(e)}function i(e){return!!e}function r(e){return/^\s*$/.test(n(e).innerHTML)}function d(e){const{style:t}=e;t.height=t.maxHeight=t.minHeight="auto",t.display="none"}function l(e){const{style:t}=e;t.height=t.maxHeight=t.minHeight="auto",t.display="none",[].forEach.call(e.children,l)}function c(e){const{style:t}=e;t.height=t.maxHeight=t.minHeight="auto",t.removeProperty("display")}function g(e){const t=document.createElement("script");t.src=e,document.body.appendChild(t)}function p(e){return s=e,(t=[]).push=function(e){return s(),delete this.push,this.push(e)},t;var t,s}function h(e){let t="function"==typeof HTMLTemplateElement;var s=document.createElement(t?"template":"div");return e=e.trim(),s.innerHTML=e,t?s.content.firstChild:s.firstChild}s.d(t,{$Z:()=>c,Bv:()=>h,Gx:()=>g,Nj:()=>n,QZ:()=>p,cf:()=>d,pn:()=>o,wo:()=>l,xb:()=>r,xj:()=>a,yb:()=>i})},763:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{t:()=>AdReports});var _common_helper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(865),_console__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(276),_ad_units__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(23);class AdReports{constructor(e,t){if(this.googletag=e,this.cam=t,this.allowedFileTypes=["image/png","image/jpg","image/jpeg"],this.ignoreValidation=!1,_console__WEBPACK_IMPORTED_MODULE_1__.cM("Ad reporting init"),this.cam=t,this.callOnButtonClick=e=>this.onButtonClick(e),this.googletag.pubads().addEventListener("slotRenderEnded",e=>this.handleSlotRendered(e)),Array.isArray(t.slotsRenderedEvents)){_console__WEBPACK_IMPORTED_MODULE_1__.cM("Adding report button to "+t.slotsRenderedEvents.length+" events that have transpired");for(var s=0;s<t.slotsRenderedEvents.length;s++)this.handleSlotRendered(t.slotsRenderedEvents[s])}}handleSlotRendered(e){if(e&&e.slot&&!e.isEmpty&&(e.creativeId||e.lineItemId||!e.isEmpty)){var t=e.slot.getSlotElementId();if(t){var s=document.getElementById(t);if(s)if((0,_ad_units__WEBPACK_IMPORTED_MODULE_0__.eq)(t)){var n=s?.closest(".js-zone-container")?.querySelector(".js-report-ad-button-container");n.innerHTML="",n.append(this.createButton(e)),n.style.height="24px",_console__WEBPACK_IMPORTED_MODULE_1__.cM("Added report button to the bottom of "+t)}else _console__WEBPACK_IMPORTED_MODULE_1__.cM("Not adding report button to the bottom of "+t+": shouldHaveReportButton = false");else _console__WEBPACK_IMPORTED_MODULE_1__.cM("Not adding report button to the bottom of "+t+": resolved invalid adUnit element")}else _console__WEBPACK_IMPORTED_MODULE_1__.cM("Not adding report button to the bottom of element: invalid adUnitElementId")}else _console__WEBPACK_IMPORTED_MODULE_1__.cM("Not adding report button to the bottom of element: invalid SlotRenderEndedEvent")}async onButtonClick(e){e.preventDefault();let t=e.target;const s=t.dataset.modalUrl,n=t.dataset.googleEventData;return await this.loadModal(s,t,n),!1}createButton(e){let t=document.createElement("button");var s=JSON.stringify(e);return t.dataset.googleEventData=s,t.dataset.modalUrl=this.cam.opt.adReportUrl,t.dataset.adUnit=e.slot.getSlotElementId(),t.classList.add("js-report-ad","s-btn","s-btn__link","fs-fine","mt2","float-right"),t.append(document.createTextNode(this.cam.opt.adReportText)),t.removeEventListener("click",this.callOnButtonClick),t.addEventListener("click",this.callOnButtonClick),t}async loadModal(url,$link,googleEventData){try{await window.StackExchange.helpers.loadModal(url,{returnElements:window.$($link)}),this.initForm(googleEventData)}catch(e){var message="",response=e.responseText?eval(`(${e.responseText})`):null;message=response&&response.isLoggedOut?this.cam.opt.adReportLoginExpiredMessage:this.cam.opt.adReportLoginErrorMessage,window.StackExchange.helpers.showToast(message,{type:"danger"})}}removeModal(){window.StackExchange.helpers.closePopups(document.querySelectorAll("."+this.cam.opt.adReportModalClass),"dismiss")}initForm(e,t=!1){this.ignoreValidation=t,this.$form=document.querySelector(".js-ad-report-form"),this.$googleEventData=this.$form.querySelector(".js-json-data"),this.$adReportReasons=this.$form.querySelectorAll(".js-ad-report-reason"),this.$adReportReasonOther=this.$form.querySelector(".js-ad-report-reason-other"),this.$fileUploaderInput=this.$form.querySelector(".js-file-uploader-input"),this.$imageUploader=this.$form.querySelector(".js-image-uploader"),this.$clearImageUpload=this.$form.querySelector(".js-clear-image-upload"),this.$imageUploaderText=this.$form.querySelector(".js-image-uploader-text"),this.$imageUploaderPreview=this.$form.querySelector(".js-image-uploader-preview"),this.$fileErrorMessage=this.$form.querySelector(".js-file-error");const s=this.$form.querySelector(".js-drag-drop-enabled"),n=this.$form.querySelector(".js-drag-drop-disabled");this.$googleEventData.value=e,this.$adReportReasons.forEach((e,t)=>e.addEventListener("change",e=>{this.$adReportReasonOther.classList.toggle("d-none","3"!==e.target.value)})),this.$fileUploaderInput.addEventListener("change",()=>{this.validateFileInput()&&this.updateImagePreview(this.$fileUploaderInput.files)}),this.$clearImageUpload.addEventListener("click",e=>{e.preventDefault(),this.clearImageUpload()});try{this.$fileUploaderInput[0].value="",this.$imageUploader.addEventListener("dragenter dragover dragleave drop",this.preventDefaults),this.$imageUploader.addEventListener("dragenter dragover",this.handleDragStart),this.$imageUploader.addEventListener("dragleave drop",this.handleDragEnd),this.$imageUploader.addEventListener("drop",this.handleDrop)}catch(e){s.classList.add("d-none"),n.classList.remove("d-none")}this.$form.removeEventListener("",this.handleDragEnd),this.$form.addEventListener("submit",async e=>(e.preventDefault(),this.submitForm(),!1))}clearImageUpload(){this.$fileUploaderInput.value="",this.$imageUploaderPreview.setAttribute("src",""),this.$imageUploaderPreview.classList.add("d-none"),this.$clearImageUpload.classList.add("d-none"),this.$imageUploaderText.classList.remove("d-none"),this.$imageUploader.classList.add("p16","ba","bas-dashed","bc-black-100")}preventDefaults(e){e.preventDefault(),e.stopPropagation()}handleDragStart(e){this.$imageUploader.classList.remove("bas-dashed"),this.$imageUploader.classList.add("bas-solid","bc-black-100")}handleDragEnd(e){this.$imageUploader.classList.remove("bas-solid","bc-black-100"),this.$imageUploader.classList.add("bas-dashed")}handleDrop(e){var t=e.originalEvent.dataTransfer.files;FileReader&&t&&1===t.length&&(this.$fileUploaderInput.files=t,this.validateFileInput()&&this.updateImagePreview(t))}setError(e){this.$fileErrorMessage.parentElement.classList.toggle("has-error",e)}updateImagePreview(e){this.$imageUploader.classList.remove("p16","ba","bas-dashed","bc-black-100"),this.$clearImageUpload.classList.remove("d-none"),this.$imageUploaderText.classList.add("d-none");var t=new FileReader;t.onload=e=>{null!=e.target&&(this.$imageUploaderPreview.setAttribute("src",e.target.result),this.$imageUploaderPreview.classList.remove("d-none"))},t.readAsDataURL(e[0])}validateFileInput(){if(this.ignoreValidation)return!0;const e=this.cam.opt.adReportFileTypeErrorMessage,t=this.cam.opt.adReportFileSizeErrorMessage;if(null==this.$fileUploaderInput.files)return!1;var s=this.$fileUploaderInput.files[0];return null==s?(this.setError(!0),!1):this.allowedFileTypes.indexOf(s.type)<0?(this.$fileErrorMessage.textContent=e,this.$fileErrorMessage.classList.remove("d-none"),this.setError(!0),!1):s.size>2097152?(this.$fileErrorMessage.textContent=t,this.$fileErrorMessage.classList.remove("d-none"),this.setError(!0),!1):(this.$fileErrorMessage.classList.add("d-none"),this.setError(!1),!0)}async gatherDiagnosticInfo(){return{BrowserVersion:await this.getBrowserVersion()}}getElementSource(e){return e.outerHTML}getNestedIFrameElement(e){var t=e.querySelector("iframe");return t.contentDocument?t.contentDocument.documentElement:t.contentWindow.document.documentElement}async getBrowserVersion(){return await navigator.userAgentData.getHighEntropyValues(["fullVersionList"]).then(e=>JSON.stringify(e.fullVersionList))}async submitForm(){if(!this.validateFileInput())return!1;this.$form.querySelector("[type=submit]").setAttribute("disabled","true");var e=JSON.parse(this.$googleEventData.value||"{}");e.Reason=parseInt(this.$form.querySelector(".js-ad-report-reason:checked").value,10),e.Description=this.$adReportReasonOther.value,this.$googleEventData.value=JSON.stringify(e);var t=new FormData(this.$form);if("1"===t.get("shareDiagnosticInfo")){var s=await this.gatherDiagnosticInfo();Object.keys(s).forEach(e=>t.append(e,s[e]))}try{const e=await window.fetch(this.$form.getAttribute("action"),{method:this.$form.getAttribute("method"),body:t,cache:"no-cache"}),s=e.headers.get("content-type")||"",a=await e.text();if(!e.ok)throw new Error("response not valid");if(0===s.indexOf("text/html")){var n=(0,_common_helper__WEBPACK_IMPORTED_MODULE_2__.Bv)(a);const e=n?n.querySelector(".js-modal-content"):null;if(_console__WEBPACK_IMPORTED_MODULE_1__.cM("$popupContent"),_console__WEBPACK_IMPORTED_MODULE_1__.cM(e),!e)throw new Error(`Could not find .js-modal-content in response from ${this.$form.getAttribute("action")}`);document.querySelector(".js-modal-content").replaceWith(e)}else window.StackExchange.helpers.showToast(this.cam.opt.adReportThanksText,{type:"success"}),this.removeModal()}catch(e){window.StackExchange.helpers.showToast(this.cam.opt.adReportErrorText,{type:"danger"})}finally{let e=this.$form.querySelector("[type=submit]");e&&e.removeAttribute("disabled")}}}},276:(e,t,s)=>{function n(...e){}function a(...e){}s.d(t,{cM:()=>n,vU:()=>a})}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var s=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](s,s.exports,__webpack_require__),s.exports}__webpack_require__.d=(e,t)=>{for(var s in t)__webpack_require__.o(t,s)&&!__webpack_require__.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var __webpack_exports__={};(()=>{var e=__webpack_require__(276),t=(e=>(e[e.Above=0]="Above",e[e.Below=1]="Below",e))(t||{});const s=Object.assign({},{"lib":"https://cdn.sstatic.net/clc/js/bundles/gam_loader_script/gam_loader_script.bundle.741.446456bdaebf9697008f.min.js","style":null,"u":null,"wa":true,"kt":2000,"tto":true,"h":"clc.stackoverflow.com","allowed":"^(((talent\\.)?stackoverflow)|(blog\\.codinghorror)|(.*\\.googlesyndication)|(serverfault|askubuntu|superuser)|([^\\.]+\\.stackexchange))\\.com$","wv":true,"al":false,"abd":true,"cpa_liid":[5882654614],"cpa_cid":[138377597667],"dp":false,"tgt_to":1000,"tgt_u":"https://clc.stackoverflow.com/get-user-acct-tgt","tgt_e":true,"tgt_p":100,"dv_enabled":true});var n=__webpack_require__(23),a=__webpack_require__(865),o=__webpack_require__(763);class i{constructor(t,s){this.googletag=t,this.interval=s,e.cM("Ad refresh init. interval: "+s),this.googletag.pubads().addEventListener("impressionViewable",e=>this.onImpressionViewable(e)),e.cM("done enabling ad refresh")}onImpressionViewable(t){var s=t.slot;e.cM("ad refresh - slot "+s.getSlotElementId()+" is viewable, initializing refresh"),this.scheduleRefresh(s)}scheduleRefresh(e){setTimeout(()=>this.refreshAdSlot(e),1e3*this.interval)}static refreshMyAd(t,s){let n=t.pubads().getSlots().find(e=>e.getSlotElementId()===s);n&&(e.cM("refreshMyAd - refreshing ad slot "+s),t.pubads().refresh([n]))}refreshAdSlot(t){var s=t.getSlotElementId();this.isElementVisibleInBrowser(s)?(e.cM("refreshing ad slot "+s),googletag.pubads().refresh([t])):(e.cM("refresh skipped this time; ad slot not viewable:"+s),this.scheduleRefresh(t))}isElementVisibleInBrowser(e){var t=document.getElementById(e);if(null!==t){var s=t.getBoundingClientRect();if(s.top>=0&&s.left>=0&&s.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&s.right<=(window.innerWidth||document.documentElement.clientWidth))return!0}return!1}}var r=(e=>(e.Off="Off",e.PreSurvey="PreSurvey",e.Collect="Collect",e.PostSurvey="PostSurvey",e))(r||{});class d{constructor(e,t){this.lineItemImpressions=[],this.surveysIdsCompleted=[],this.lineItemImpressions=e,this.surveysIdsCompleted=t}addImpression(e,t){let s={brandId:e,lineItemId:t,timestamp:new Date};this.lineItemImpressions.push(s)}addBrandSurveyCompleted(e){-1===this.surveysIdsCompleted.indexOf(e)&&this.surveysIdsCompleted.push(e)}getTotalBrandImpressions(){let e=new Map;for(let t of this.lineItemImpressions)if(e.has(t.brandId)){let s=e.get(t.brandId);e.set(t.brandId,s+1)}else e.set(t.brandId,1);return e}getBrandLineItemImpressions(e){let t={};for(let s of this.lineItemImpressions)if(s.brandId==e)if(void 0!==t[s.lineItemId]){let e=t[s.lineItemId];t[s.lineItemId]=e+1}else t[s.lineItemId]=1;return t}}class l{constructor(){this.surveyEngagementLocalStorageKey="clc-survey-engagement"}getBrandSurveyEngagement(){let e=localStorage.getItem(this.surveyEngagementLocalStorageKey);if(null===e)return new d([],[]);let t=JSON.parse(e);return new d(t.lineItemImpressions,t.surveysIdsCompleted)}saveBrandSurveyEngagement(e){let t=JSON.stringify(e);localStorage.setItem(this.surveyEngagementLocalStorageKey,t)}}class c{constructor(){this.surveyRepository=new l}getBrandSurveyEngagement(){return this.surveyRepository.getBrandSurveyEngagement()}recordImpression(e,t){let s=this.getBrandSurveyEngagement();s.addImpression(e,t),this.surveyRepository.saveBrandSurveyEngagement(s)}recordBrandSurveyCompleted(e){let t=this.getBrandSurveyEngagement();t.addBrandSurveyCompleted(e),this.surveyRepository.saveBrandSurveyEngagement(t)}}class g{constructor(t,s){this.googletag=t,this.brandSettings=s,this.brandSlotMap=new Map,this.brandSurveyEngagementService=new c,e.cM("Brand Survey init: "+JSON.stringify(s)),void 0!==s?(this.googletag.pubads().addEventListener("slotRenderEnded",e=>this.handleSlotRendered(e)),this.googletag.pubads().addEventListener("impressionViewable",e=>this.onImpressionViewable(e)),e.cM("done enabling Brand Survey")):e.cM("Brand Survey init: brandSettings is undefined, not initializing")}handleSlotRendered(t){e.cM("Brand Survey - slot rendered - slot:"+JSON.stringify(t.slot.getSlotElementId())+" lineItem: "+t.lineItemId);let s=this.findItemWithId(t.lineItemId);if(null===s||s.mode!==r.Collect)this.brandSlotMap.delete(t.slot.getSlotElementId());else{let e={brandId:s.brandId,lineItemId:t.lineItemId};this.brandSlotMap.set(t.slot.getSlotElementId(),e)}}onImpressionViewable(t){let s=t.slot;if(e.cM("ad - Brand Survey - impression viewable.  Details: "+JSON.stringify(s.getSlotElementId())),e.cM("ad - Brand Survey - slot "+s.getSlotElementId()+" is viewable"),this.brandSlotMap.has(s.getSlotElementId())){let t=this.brandSlotMap.get(s.getSlotElementId());e.cM("Brand Survey - brand "+t.brandId+" is viewable"),this.recordImpression(this.brandSlotMap.get(s.getSlotElementId()))}}recordImpression(t){e.cM("ad - Brand Survey - recording impression for brand "+t.brandId),this.brandSurveyEngagementService.recordImpression(t.brandId,t.lineItemId)}findItemWithId(t){return e.cM("brand settings: "+JSON.stringify(this.brandSettings)),this.brandSettings.find(e=>e.lineItemIds.includes(t))||null}}const p="response-brand-survey-submit|",h="request-brand-survey-metadata|",m="record-metric-on-server|",u="request-dsp-tags",f="response-dsp-tags|";class v{static refreshAdIfBrandSurveyIsDuplicated(e,t,s){this.alreadyCompletedThisBrandSurvey(t)&&i.refreshMyAd(e,s)}static alreadyCompletedThisBrandSurvey(e){return(new c).getBrandSurveyEngagement().surveysIdsCompleted.includes(e)}}window.cam=new class{constructor(t=null){if(this.gptImported=!1,this.slotsRenderedEvents=[],this.collapsed={},e.cM("constructor"),this.clc_options=s,window.clcGamLoaderOptions)Object.assign(this,window.clcGamLoaderOptions);else if(void 0===this.opt){let e=window.opt;e&&(this.opt=e)}}init(){if(e.cM("init"),void 0===this.opt)throw new Error("opt not set, required by GAM Loader");e.cM("init brand survey service"),this.getUserMetaPromise=this.getUserMeta(),e.cM("setup message handler"),window.addEventListener("message",e=>{this.onmessage(e)})}handleSlotRenderedNoAdReport(){if(googletag.pubads().addEventListener("slotRenderEnded",e=>this.applyExtraMarginBottom(e)),Array.isArray(this.slotsRenderedEvents))for(var e=0;e<this.slotsRenderedEvents.length;e++)this.applyExtraMarginBottom(this.slotsRenderedEvents[e])}onmessage(t){let s="omni";if(t.data&&("string"==typeof t.data||t.data instanceof String))if(0===t.data.indexOf("get-omni-")){e.cM("Recevied get-omni message, sending back omni");var n=t.source,o=this.opt.omni,i="string"==typeof o?o:"";n.postMessage([s,i,this.opt.perRequestGuid].join("|"),"*")}else if(0===t.data.indexOf("collapse-")){e.cM("Recevied collapse message, collapse ad iframe"),e.cM(t);for(var r=t.source.window,d=document.getElementsByTagName("IFRAME"),l=0;l<d.length;l++){var g=d[l];if(g.contentWindow==r)return void(0,a.wo)(g.parentElement.parentElement.parentElement)}}else if(0===t.data.indexOf("resize|")){e.cM("Recevied resize message, resize ad iframe"),e.cM(t);let s=this._getFrameByEvent(t),n=t.data.indexOf("|")+1,a=t.data.slice(n),o=parseFloat(a)+.5;e.cM("New iframe height "+o),s.height=o.toString(),s.parentElement.style.height=o.toString()+"px"}else if(0===t.data.indexOf("getmarkup|")){let s=t.data.indexOf("|")+1,n=t.data.slice(s);e.cM("Recevied get markup message: "+n);let a=this._getFrameByEvent(t).closest(".everyonelovesstackoverflow");const o=document.createElement("script");o.dataset.adZoneId=a.id,o.src=n,document.body.appendChild(o)}else if(0===t.data.indexOf("window-location|")){let s=t.data.indexOf("|")+1,n=t.data.slice(s);e.cM("Recevied window location message: "+n),n.startsWith("/")||(n="/"+n),window.open(window.location.protocol+"//"+window.location.host+n,"_blank")}else if(0===t.data.indexOf("request-brand-survey-submit|")){let s=t.data.split("|"),n=s[1],a=s[2],o=s[3],i=JSON.parse(o);e.cM(n),e.cM(a),e.cM(o),e.cM("Received brand survey "+n+" response message: "+a);var _=new FormData;for(var b in i)_.append(b,i[b]);let r=this._getFrameByEvent(t);if(v.alreadyCompletedThisBrandSurvey(+n))return e.cM("Already completed this brand survey.  Not submitting duplicate to server."),void r.contentWindow.postMessage("response-brand-survey-submit-duplicate|","*");e.cM("Send the brand survey to the server"),fetch(a,{method:"POST",body:_}).then(e=>e.json()).then(e=>r.contentWindow.postMessage(p,"*")).catch(e=>r.contentWindow.postMessage(p,"*"))}else if(0===t.data.indexOf("brand-survey-completed-store|")){let s=t.data.split("|"),n=(s[1],s[2]);if(e.cM("Received brand survey completed store message for survey ID "+n),v.alreadyCompletedThisBrandSurvey(+n))return void e.cM("Already completed this brand survey.  Not recording duplicate locally.");e.cM("Record brand survey completion locally"),(new c).recordBrandSurveyCompleted(+n)}else if(0===t.data.indexOf(h)){let s=t.data.split("|"),n=s[1],a=s[2];e.cM("Received message: request-brand-survey-metadata| with Brand Survey ID "+a);let o=(new c).getBrandSurveyEngagement().getBrandLineItemImpressions(+n),i=JSON.stringify(o),r=this._getFrameByEvent(t);e.cM("sending impression data: "+i),r.contentWindow.postMessage("response-brand-survey-metadata|"+this.opt.responseHash+"|"+this.opt.perRequestGuid+"|"+i,"*")}else if(0===t.data.indexOf("refresh-if-duplicate-brand-survey|")){let e=t.data.split("|")[1],s=this.getSlotElementIdByEvent(t);v.refreshAdIfBrandSurveyIsDuplicated(googletag,+e,s)}else if(0===t.data.indexOf(m)){e.cM("Received message: record-metric-on-server| with args: "+t.data);let s=t.data.split("|"),n=s[1],a=s[2],o=s[3],i=s[4],r=new FormData;r.append("brandSurveyId",o.toString()),r.append("responseHash",this.opt.responseHash),r.append("perRequestGuid",this.opt.perRequestGuid),r.append("questionNumber",n.toString()),r.append("metricType",i.toString()),fetch(a,{method:"POST",body:r}).then(e=>e.ok).catch(t=>{e.cM("SendMetricToServer: Error sending metric to server: "+t)})}else if(0===t.data.indexOf(u)){e.cM("Received message: request-dsp-tags with args: "+t.data);let s=this._getFrameByEvent(t);if(!this.opt.targeting["so-tag"])return void s.contentWindow.postMessage(f,"*");const n=this.opt.targeting["so-tag"].join(",");e.cM("sending targeting tags: "+n),s.contentWindow.postMessage(f+n,"*")}else e.cM("Received unhandled message")}getSlotElementIdByEvent(e){let t=this._getFrameByEvent(e).parentElement?.parentElement?.id;return t||""}_getFrameByEvent(e){return Array.from(document.getElementsByTagName("iframe")).filter(t=>t.contentWindow===e.source)[0]}classifyZoneIds(e){const t=e.map(a.Nj).filter(a.yb);return{eligible:t.filter(a.xb).filter(a.pn),ineligible:t.filter(a.xj)}}applyExtraMarginBottom(t){if(t&&t.slot&&!t.isEmpty&&(t.creativeId||t.lineItemId||!t.isEmpty)){var s=t.slot.getSlotElementId();if(s){var a=document.getElementById(s);if(a)if((0,n.eq)(s)){var o=a?.closest(".js-zone-container");o.style.marginBottom="24px",e.cM("Applied extra margin to the bottom of "+s)}else e.cM("Not applying extra margin to the bottom of "+s+": shouldHaveReportButton = false");else e.cM("Not applying extra margin to the bottom of "+s+": resolved invalid adUnit element")}else e.cM("Not applying extra margin to the bottom of element: invalid adUnitElementId")}else e.cM("Not applying extra margin to the bottom of element: invalid SlotRenderEndedEvent")}async load(s=(0,n.kG)()){const r=this.opt.tlb_position===t.Above?["dfp-mlb","dfp-smlb"]:["dfp-mlb","dfp-smlb","dfp-tlb"];if(!this.isGptReady())return e.cM("Initializing..."),this.initGpt(),void googletag.cmd.push(()=>this.load(s));this.opt.adReportEnabled?(e.cM("Ad reporting enabled"),this.adReports=new o.t(googletag,this)):(e.cM("Ad reporting not enabled"),this.handleSlotRenderedNoAdReport()),this.opt.refresh?(e.cM("Ad refresh enabled"),this.adRefresh=new i(googletag,this.opt.refreshInterval)):e.cM("Ad refresh not enabled"),this.opt.brandSurveyEnabled&&(e.cM("Brand Survey enabled"),this.brandSurvey=new g(googletag,this.opt.brandSurveySettings)),e.cM("Attempting to load ads into ids: ",s);const{eligible:d,ineligible:l}=this.classifyZoneIds(s);if(this.initDebugPanel(googletag,d.concat(l)),d.forEach(e=>(0,a.cf)(e)),l.forEach(a.wo),0===d.length)return void e.cM("Found no ad ids on page");e.cM("Eligible ids:",d),this.opt.abd&&this.appendAdblockDetector();var c=googletag.pubads().getSlots();if(c){var p=c.filter(e=>s.indexOf(e.getSlotElementId())>=0);googletag.destroySlots(p)}this.opt.sf&&(googletag.pubads().setForceSafeFrame(!0),googletag.pubads().setSafeFrameConfig({allowOverlayExpansion:!0,allowPushExpansion:!0,sandbox:!0})),e.cM("Targeting consent: Checking...");let h=!1,m=!1;void 0!==this.opt.targeting_consent&&(m=!0,e.cM("Targeting consent: Parameter set"),e.cM("Targeting consent: Consent given? ",this.opt.targeting_consent),h=this.opt.targeting_consent),void 0!==this.opt.personalization_consent&&(e.cM("Personalization consent: Parameter set"),e.cM("Personalization consent: Consent given? ",this.opt.personalization_consent),h=h&&this.opt.personalization_consent),h=h&&m,this.setPrivacySettings(h),this.opt.ll||googletag.pubads().enableSingleRequest(),cam.sreEvent||(googletag.pubads().addEventListener("slotRenderEnded",e=>this.onSlotRendered(e)),cam.sreEvent=!0),await this.setTargeting();var u=d.filter(e=>!this.opt.ll||r.indexOf(e.id)<0),f=d.filter(e=>!!this.opt.ll&&r.indexOf(e.id)>=0);e.cM("Up front ids:",u),e.cM("Lazy loaded ids:",f),u.forEach(t=>{e.cM(`Defining ad for element ${t.id}`),this.defineSlot(t.id,googletag),t.setAttribute("data-dfp-zone","true")}),googletag.enableServices(),u.forEach(t=>{e.cM(`Displaying ad for element ${t.id}`),this.clc_options.dv_enabled?window.onDvtagReady(function(){googletag.display(t.id)}):googletag.cmd.push(()=>googletag.display(t.id))}),this.opt.ll&&(e.cM("Enabling lazy loading for GAM"),googletag.pubads().enableLazyLoad({fetchMarginPercent:0,renderMarginPercent:0}),e.cM("Setting up lazy loaded ad units"),f.forEach(t=>{e.cM(`Lazy loading - Defining Slot ${t.id}`),this.defineSlot(t.id,googletag)}),f.forEach(t=>{e.cM(`Lazy loading - Displaying ad for element ${t.id}`),this.clc_options.dv_enabled?window.onDvtagReady(function(){googletag.display(t.id)}):googletag.cmd.push(()=>googletag.display(t.id))}))}setPrivacySettings(e){e||googletag.pubads().setPrivacySettings({nonPersonalizedAds:!0})}async setTargeting(){if(!googletag)throw new Error("googletag not defined");let t=this.opt.targeting;if(!t)throw new Error("Targeting not defined (is "+typeof t+")");Object.keys(t).forEach(s=>{e.cM(`-> targeting - ${s}: ${t[s]}`),googletag.pubads().setTargeting(s,t[s])});let s=!1;if(void 0!==this.opt.targeting_consent&&(s=this.opt.targeting_consent),s){let t=(new c).getBrandSurveyEngagement();if(t.getTotalBrandImpressions().forEach((t,s)=>{e.cM(`-> targeting - BrandImpressions: ${s}: ${t}`),googletag.pubads().setTargeting("brand_"+s.toString()+"_impressions",t.toString())}),t.surveysIdsCompleted.forEach(t=>{e.cM(`-> targeting - SurveysTaken: ${t}`),googletag.pubads().setTargeting("survey_"+t+"_taken","true")}),this.clc_options.tgt_e&&this.getUserMetaPromise){let t=await this.getUserMetaPromise;t&&t.tgt_acct?(e.cM("-> targeting - User Account: "+t.tgt_acct),googletag.pubads().setTargeting("user-acct",t.tgt_acct.company_name),googletag.pubads().setTargeting("user_acct_top",t.tgt_acct.company_name),googletag.pubads().setTargeting("user_industry",t.tgt_acct.industry),googletag.pubads().setTargeting("user_employee_count",t.tgt_acct.employee_range)):e.cM("-> targeting - User Account: Not Found"),t&&Object.prototype.hasOwnProperty.call(t,"is_high_rep_earner")?(e.cM("-> targeting - High Rep Earner: "+t.is_high_rep_earner),googletag.pubads().setTargeting("IsHighRepEarner",t.is_high_rep_earner?"true":"false")):e.cM("-> targeting - High Rep Earner: not found")}}}appendAdblockDetector(){const e=document.createElement("div");e.className="adsbox",e.id="clc-abd",e.style.position="absolute",e.style.pointerEvents="none",e.innerHTML="&nbsp;",document.body.appendChild(e)}onSlotRendered(s){try{const i=s.slot.getSlotElementId();let r=[];i||r.push("id=0");const d=document.getElementById(i);if(i&&!d&&r.push("el=0"),0!==r.length)return void this.stalled(r.join("&"));const{path:l,sizes:c,zone:g}=(0,n.Z7)(i);if(this.collapsed[g]&&s.isEmpty)return e.cM(`No line item for the element #${d.id}... collapsing.`),void(0,a.wo)(d);if(this.slotsRenderedEvents.push(s),s.lineItemId||s.creativeId||!s.isEmpty){e.cM(`Rendered ad for element #${d.id} [line item #${s.lineItemId}]`),e.cM(s);var o=d.parentElement;if(o.classList.contains("js-zone-container")){switch((0,a.cf)(o),i){case"dfp-tlb":this.opt.tlb_position===t.Above?o.classList.add("mb8"):o.classList.add("mt16");break;case"dfp-tag":o.classList.add("mb8");break;case"dfp-msb":o.classList.add("mt16");break;case"dfp-mlb":case"dfp-smlb":case"dfp-bmlb":o.classList.add("my8");break;case"dfp-isb":o.classList.add("mt24");break;case"dfp-m-aq":o.classList.add("my12"),o.classList.add("mx-auto")}(0,a.$Z)(o),(0,a.$Z)(d)}else e.cM(`No ad for element #${d.id}, collapsing`),e.cM(s),(0,a.wo)(d)}}catch(t){e.cM("Exception thrown onSlotRendered"),e.cM(t),this.stalled("e=1")}}stalled(e){(new Image).src=`https://${this.clc_options.h}/stalled.gif?${e}`}defineSlot(t,s){"dfp-isb"===t&&(e.cM("-> targeting - Sidebar: Inline"),s.pubads().setTargeting("Sidebar",["Inline"])),"dfp-tsb"===t&&(e.cM("-> targeting - Sidebar: Right"),s.pubads().setTargeting("Sidebar",["Right"]));const{path:a,sizes:o,zone:i}=(0,n.Z7)(t);e.cM(`Defining slot for ${t}: ${a}, sizes: ${JSON.stringify(o)}`),s.defineSlot(a,o,t).addService(s.pubads())}importGptLibrary(){this.gptImported||(this.gptImported=!0,void 0===this.opt.targeting_consent||this.opt.targeting_consent?(0,a.Gx)("https://securepubads.g.doubleclick.net/tag/js/gpt.js"):(0,a.Gx)("https://pagead2.googlesyndication.com/tag/js/gpt.js"))}importDvLibrary(){this.clc_options.dv_enabled&&(e.cM("Adding DoubleVerify library"),(0,a.Gx)("https://pub.doubleverify.com/dvtag/21569774/DV1289064/pub.js"),e.cM("Adding DoubleVerify onDvtagReady handler"),window.onDvtagReady=function(t,s=750){e.cM("DoubleVerify onDvtagReady called"),window.dvtag=window.dvtag||{},dvtag.cmd=dvtag.cmd||[];const n={callback:t,timeout:s,timestamp:(new Date).getTime()};dvtag.cmd.push(function(){dvtag.queueAdRequest(n)}),setTimeout(function(){const e=n.callback;n.callback=null,e&&e()},s)})}isGptReady(){return"undefined"!=typeof googletag&&!!googletag.apiReady}initGpt(){"undefined"==typeof googletag&&(window.googletag={cmd:(0,a.QZ)(()=>{this.importGptLibrary(),this.importDvLibrary()})})}getUserMeta(){if(this.opt.allowAccountTargetingForThisRequest&&this.clc_options.tgt_e&&this.clc_options.tgt_p>0){if(e.cM("Targeting enabled."),this.clc_options.tgt_p<100){e.cM("Targeting rate limit enabled.  Rolling the dice...");const t=Math.floor(100*Math.random())+1;if(e.cM("Rolled "+t+" and the max is "+this.clc_options.tgt_p),t>this.clc_options.tgt_p)return void e.cM("Will not request targeting.")}return e.cM("Will request targeting."),function(e,t,s,n){if(t){const t=new Headers;return t.append("Accept","application/json"),async function(e,t={},s=5e3){if("number"!=typeof s&&null!=s&&!1!==s){if("string"!=typeof s)throw new Error("fetchWithTimeout: timeout must be a number");if(s=parseInt(s),isNaN(s))throw new Error("fetchWithTimeout: timeout must be a number (or string that can be parsed to a number)")}const n=new AbortController,{signal:a}=n,o=fetch(e,{...t,signal:a}),i=setTimeout(()=>n.abort(),s);try{const e=await o;return clearTimeout(i),e}catch(e){throw clearTimeout(i),e}}(s+"?"+new URLSearchParams({omni:e}),{method:"GET",mode:"cors",headers:t},n).then(e=>e.json())}return Promise.reject("No consent")}(this.opt.omni,this.opt.targeting_consent,this.clc_options.tgt_u,this.clc_options.tgt_to).catch(t=>{e.vU("Error fetching user account targeting"),e.vU(t)})}e.cM("Targeting disabled.  Will not request account targeting data.")}initDebugPanel(t,s){e.cM("initDebugPanel"),e.cM("Not showing debug panel.")}},window.clcGamLoaderOptions&&(cam.init(),cam.load())})()})();
</script>

<footer class="site-footer js-footer theme-light__forced" id="footer" role="contentinfo">
    <div class="site-footer--container">
        <div class="site-footer--logo">

            <a aria-label="Stack Overflow" href="https://stackoverflow.com">
                <svg aria-hidden="true" class="native svg-icon iconLogoGlyphMd" height="37" viewBox="0 0 32 37"
                     width="32">
                    <path d="M26 33v-9h4v13H0V24h4v9h22Z" fill="#BCBBBB"/>
                    <path d="m21.5 0-2.7 2 9.9 13.3 2.7-2L21.5 0ZM26 18.4 13.3 7.8l2.1-2.5 12.7 10.6-2.1 2.5ZM9.1 15.2l15 7 1.4-3-15-7-1.4 3Zm14 10.79.68-2.95-16.1-3.35L7 23l16.1 2.99ZM23 30H7v-3h16v3Z"
                          fill="#F48024"/>
                </svg>
            </a>
        </div>
        <nav class="site-footer--nav">
            <div class="site-footer--col">
                <h5 class="-title"><a class="js-gps-track" data-gps-track="footer.click({ location: 2, link: 15})"
                                      href="https://stackoverflow.com">Stack Overflow</a></h5>
                <ul class="-list js-primary-footer-links">
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 16})"
                           href="/questions">Questions</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 3 })"
                           href="/help">Help</a></li>
                </ul>
            </div>
            <div class="site-footer--col">
                <h5 class="-title"><a class="js-gps-track" data-gps-track="footer.click({ location: 2, link: 19 })"
                                      href="https://stackoverflow.co/">Products</a></h5>
                <ul class="-list">
                    <li><a class="js-gps-track -link" data-ga="[&quot;teams traffic&quot;,&quot;footer - site nav&quot;,&quot;stackoverflow.com/teams&quot;,null,{&quot;dimension4&quot;:&quot;teams&quot;}]"
                           data-gps-track="footer.click({ location: 2, link: 29 })"
                           href="https://stackoverflow.co/teams/">Teams</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 21 })"
                           href="https://stackoverflow.co/advertising/">Advertising</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 40 })"
                           href="https://stackoverflow.co/collectives/">Collectives</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 20 })"
                           href="https://stackoverflow.co/talent/">Talent</a></li>
                </ul>
            </div>
            <div class="site-footer--col">
                <h5 class="-title"><a class="js-gps-track" data-gps-track="footer.click({ location: 2, link: 1 })"
                                      href="https://stackoverflow.co/">Company</a></h5>
                <ul class="-list">
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 1 })"
                           href="https://stackoverflow.co/">About</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 27 })"
                           href="https://stackoverflow.co/company/press/">Press</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 9 })"
                           href="https://stackoverflow.co/company/work-here/">Work Here</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 7 })"
                           href="https://stackoverflow.com/legal">Legal</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 8 })"
                           href="https://stackoverflow.com/legal/privacy-policy">Privacy Policy</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 37 })"
                           href="https://stackoverflow.com/legal/terms-of-service/public">Terms of Service</a></li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 13 })"
                           href="/contact">Contact Us</a></li>
                    <li id="consent-footer-link">
                        <button class="s-btn s-btn__link py4 js-gps-track -link" data-action="click->cookie-settings#toggle"
                                data-consent-popup-loader="footer"
                                data-controller="cookie-settings"
                                data-gps-track="footer.click({ location: 2, link: 38 })"
                                type="button">Cookie Settings
                        </button>
                    </li>
                    <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link: 39 })"
                           href="https://stackoverflow.com/legal/cookie-policy">Cookie Policy</a></li>
                </ul>
            </div>
            <div class="site-footer--col site-footer--categories-nav">
                <div>
                    <h5 class="-title"><a data-gps-track="footer.click({ location: 2, link: 30 })"
                                          href="https://stackexchange.com">Stack Exchange
                        Network</a></h5>
                    <ul class="-list">
                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://stackexchange.com/sites#technology">
                                Technology
                            </a>
                        </li>
                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://stackexchange.com/sites#culturerecreation">
                                Culture &amp; recreation
                            </a>
                        </li>
                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://stackexchange.com/sites#lifearts">
                                Life &amp; arts
                            </a>
                        </li>
                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://stackexchange.com/sites#science">
                                Science
                            </a>
                        </li>
                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://stackexchange.com/sites#professional">
                                Professional
                            </a>
                        </li>
                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://stackexchange.com/sites#business">
                                Business
                            </a>
                        </li>

                        <li class="mt16 md:mt0">
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://api.stackexchange.com/">
                                API
                            </a>
                        </li>

                        <li>
                            <a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 24 })"
                               href="https://data.stackexchange.com/">
                                Data
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
        <div class="site-footer--copyright fs-fine md:mt24">
            <ul class="-list -social md:mb8">
                <li><a class="js-gps-track -link" data-gps-track="footer.click({ location: 2, link:4 })"
                       href="https://stackoverflow.blog?blb=1">Blog</a></li>
                <li><a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 31 })"
                       href="https://www.facebook.com/officialstackoverflow/">Facebook</a></li>
                <li><a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 32 })"
                       href="https://twitter.com/stackoverflow">Twitter</a></li>
                <li><a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 33 })"
                       href="https://linkedin.com/company/stack-overflow">LinkedIn</a></li>
                <li><a class="-link js-gps-track" data-gps-track="footer.click({ location: 2, link: 36 })"
                       href="https://www.instagram.com/thestackoverflow">Instagram</a></li>
            </ul>

            <p class="md:mb0">
                Site design / logo &#169; 2024 Stack Exchange Inc; user contributions licensed under <span
                    class='td-underline'><a href="https://stackoverflow.com/help/licensing">CC BY-SA</a></span>. <span
                    id="svnrev">rev&nbsp;2024.3.14.6266</span>
            </p>
        </div>
    </div>

</footer>


<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WCZ03SZFCQ"></script>
<script>
    window.dataLayer = window.dataLayer || [];
                function gtag() { dataLayer.push(arguments); }
</script>
<script>
    (function(i, s, o, g, r, a, m) {
                    i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function() { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o),
                        m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m);
                })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
</script>
<script>
    StackExchange.ready(function() {

                var ga3Settings = {
                    autoLink: ["stackoverflow.blog","info.stackoverflowsolutions.com","stackoverflowsolutions.com"],
                    sendTitles: true,
                    tracker: window.ga,
                    trackingCodes: [
                        'UA-108242619-1'
                    ],
                    checkDimension: 'dimension42'
                };

                var customGA4Dimensions = {};


                    customGA4Dimensions["routename"] = "Questions/Show";


                    customGA4Dimensions["post_id"] = "113780";


                    customGA4Dimensions["tags"] = "|javascript|function|currying|partial-application|";


                var ga4Settings = {
                    tracker: gtag,
                    trackingCodes: [
                        'G-WCZ03SZFCQ'
                    ],
                    consentsToPerformanceCookies: "granted",
                    consentsToTargetingCookies: "granted",
                    eventParameters: customGA4Dimensions,
                    checkForAdBlock: true,
                    sendTitles: true,
                    trackClicks: false,
                };

                StackExchange.ga.init({ GA3: ga3Settings, GA4: ga4Settings });

                StackExchange.ga.setDimension('dimension1', '367545');

                StackExchange.ga.setDimension('dimension2', '|javascript|function|currying|partial-application|');


                StackExchange.ga.setDimension('dimension3', 'Questions/Show');


                StackExchange.ga.setDimension('dimension7', "1710719472.1707065574");

                StackExchange.ga.trackPageView();
            });
</script>

<script charset="UTF-8" data-document-language="true" data-domain-script="c3d9f1e3-55f3-4eba-b268-46cee4c6789c"
        src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"></script>
<script defer src="https://cdn.sstatic.net/Js/modules/cookie-consent.en.js?v=36bebc18e04f"></script>


</body>
</html>
